$user_subject = 'new order';
$email_us = $_REQUEST['email'];
$name_us = $_REQUEST['name'];
$phone_us = $_REQUEST['phone'];
$qut = $_REQUEST['qut'];
$message_us = $_REQUEST['message'];
$email = "[email protected]";
$message = '<HTML><body dir="rtl">';
.
.
.
.
if(mail($email, $user_subject, $message, $headers)) {
$mess_err = "Successful message";
}
I am trying to send a message to multiple e-mails. I have tried:
$email = "[email protected]"; "[email protected]";
// in this case is taking first one only
$email = array("[email protected]", "[email protected]");
// in this case it send me an error like: Warning: mail() expects parameter 1 to be string, array given
tried also converting it to string:
$emails = array("[email protected]", "[email protected]");
$email = array_shift($emails);
// in this case doesn't work at all
Please help me on this. I need to send a message to 2 emails instead of 1. How do i do this?