Answer the question
In order to leave comments, you need to log in
How to send data to 2 mailboxes?
The page has a form for submitting data, if I'm not mistaken, this code is responsible for this:
$args = array(
'key' => 'какой-то ключ,
'message' => array(
"html" => null,
"text" => 'Заявка с сайта сайт.ru. '.print_r($_POST,true),
"from_email" => 'какая-то почта',
"from_name" => 'Заявка',
"subject" => 'У вас новая заявка',
"to" => array(array('еmail'=>'еще почта'))
)
);
mail($args['message']['to'][0]['email'],$args['message']['subject'],$args['message']['text']);
"to" => array(array('еmail'=>'еще почта', 'доп. почта'))
и так:
"to" => array(array('еmail'=>'еще почта', 'еmail'=>'доп. почта'))
$args = array(
'key' => 'какой-то ключ,
'message' => array(
"html" => null,
"text" => 'Заявка с сайта сайт.ru. '.print_r($_POST,true),
"from_email" => 'какая-то почта',
"from_name" => 'Заявка',
"subject" => 'У вас новая заявка',
"to" => array(array('еmail'=>'еще почта'))
)
);
mail($args['message']['to'][0]['email'],$args['message']['subject'],$args['message']['text']);
// второй массив
$args-second = array(
'key' => 'какой-то ключ,
'message' => array(
"html" => null,
"text" => 'Заявка с сайта сайт.ru. '.print_r($_POST,true),
"from_email" => 'какая-то почта',
"from_name" => 'Заявка',
"subject" => 'У вас новая заявка',
"to" => array(array('еmail'=>'еще почта'))
)
);
mail($args-second['message']['to'][0]['email'],$args-second['message']['subject'],$args-second['message']['text']);
Answer the question
In order to leave comments, you need to log in
www.php.su/mail
/* получатели */
$to= "Mary <[email protected]>" . ", " ; //обратите внимание на запятую
$to .= "Kelly <[email protected]>";
/*...*/
mail($to, $subject, $message, $headers);
But my code (not written by me) looks different, and what does array mean in it if it's not an array?
"to" => array(array('еmail'=>'[email protected]'))
and further:
mail($args['message']['to'][0]['email'].. .
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question