php, mail, cc not really working
Hi,
The following code run without errors. I get the mail ,and also it show the mail was cc'ed to who it should.
but the mail never arrive at the cc'ed address..tired of this one now!
Code:
function send_site_message ($name, $country, $email, $subject, $message, $selfcc) {
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
if ($selfcc)
$headers .= "cc:".$name."<".$email.">";
$message = "
<html>
<head> ... and rest of html...
</html>
";
$success = mail(SMTP_USER, $subject, $message, $headers, "-f".$email);
Re: php, mail, cc not really working
Try
"cc:".$email;
; so don't mention the name.
Re: php, mail, cc not really working
I do believe the correct format is "Cc: [email protected]" note the space and capitalisation of the first C. Also, the MTA as per RFC 1123 is not obliged to act upon cc and bcc headers so you should use a comma separated list of addresses in the $to argument of the function.
Re: php, mail, cc not really working
thanks both of you.
i followed both of your's advice and seems to work..intermittently. and my html mail seems not to work always..aiya
try it yourself here (excuse the mess..just try to get things working before putting on the makeup)