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. enter image description here

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.

http://pear.php.net/manual/en/package.mail.mail.send.php


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -