I am trying to use cc in mail function, but the tricky part is that I cannot put more than one address as cc. Any helps?
$email_to, $email_subject, $message, $headers, $return_path values are all assigned, and these variables/values are OK.
$cc_recipient="bob@myemail.com"; //if I assign $cc_recipient value to one address, it will be fine.
$cc_recipient="bob@myemail.com, bob2@myemail.com"; //if i try to assign more than one e-mail address to the $cc_recipient, then cc part will not work
Any helps?
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; //content type
//$headers .= "Bcc: $bcc_recipient <$bcc_recipient>\r\n";
$headers .= "Cc: $cc_recipient \r\n";
$headers .= "From: $email_from <$email_from>\r\n";
$headers .= "X-Sender: <$email_from>\r\n";
$headers .= "Reply-To: <$reply_to>\r\n";
$headers .= "Return-Path: <$return_path>\r\n";
$headers .= "X-Priority: $message_priority\r\n"; //1 UrgentMessage, 3 Normal
//$headers .= "X-MSMail-Priority: High\r\n";
$headers .= "X-Mailer: PHP\r\n"; //mailer
$contenttype = "Content-Type: text/html\r\n";
$message=wordwrap($message, 72);
$mailresult = mail($email_to, $email_subject, $message, $headers, "-f $return_path");