Hi, I'm trying to send Emails using the mail() function, like this:
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From: MRCICT Administration <admin@mrcict.monash.edu.au>\r\n";
$headers .= "Cc: [email]adam_george_@hotmail.com[/email]\r\n";
$headers .= "Bcc: [email]asgeo1@student.monash.edu.au[/email]\r\n";
mail($email, $subject, $message, $headers);
So what the problem is that the bcc, does nothing at all, and I get mail delivery failure messages back for the cc field.
----- The following addresses had permanent fatal errors -----
<Cc: adam_george_@hotmail.com>
(reason: 501 Invalid Address)
It stuffs up the Cc email addresses.... why the heck is it appending Cc: to the email address? at least that's what I assume that error message means. It's trying to send a message to "cc: adam_george_@hotmail.com" ... which doesn't make much sence cause emails don't have spaces...
anyway, I've been looking on the forums and at php.net but haven't been able to find what the problem is....
If I ommit the cc and bcc headers, the email sends correctly to the destination in $email. ... so I'm not really sure what the problem is...
I don't think it has to do with spam settings or anything on the mail server...
If anyone could help out that would be great. Thanks.