Im trying to write a script with which I can BCC email a large amount of people, but it's not working.
$headers = 'From: host@host.com' . "\r\n" .
'Bcc: user1@mail.com, user2@mail.com, user3@host.com' . "\r\n" .
'Reply-To: host@mail.com' . "\r\n" .
'MIME-Version: 1.0' . "\r\n" .
'Content-type: text/html; charset=iso-8859-1' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($to, '=?UTF-8?B?'.base64_encode($subject).'?=', $message, $headers);
Whenever I run it, the script mails to only the server's owned email addresses. For example, in the above script, user3@host.com would get the email, but user1 and user2 wouldnt. Even worse, I can only actually reach user 1 or 2 by making them the $to field, but that wouldnt even work if theres still any Bcc specified.
I did not originally create this code, I'm merely trying to modify code created by the previous owner, so if I'm missing anything obvious, I'm sorry!
Thanks in advance!