email - Issue with Cc and Bcc in sending mails using SMTP - PHP -
i'm sending email php page using smtp. works perfect except bcc.
this how got email, interestingly can see bcc well.
whats wrong in code, can please help.
$headers = array("mime-version"=> '1.0', "content-type" => "text/html; charset=iso-8859-1", "from" => $from, "to" => $to, "bcc" => $user_copy, "reply-to" => $from, "subject" => $subject); $smtp = mail::factory('smtp', array ('host' => $host, 'auth' => true, 'username' => $username, 'password' => $password)); $mail = $smtp->send($to, $headers, $message);
diagnose:
mail server not strip bcc: headers.
fix:
do not specify bcc recipients in bcc:
headers.
add bcc recipients first parameter of send
.
Comments
Post a Comment