Phpmailer AddBcc nie działa
Używam phpmailer do wysyłania wiadomości e-mail i działa to, że adresaci otrzymują pocztę z wyjątkiem tego, że szczegóły bcc i cc nie wyświetlają wiadomości. Ktoś może zasugerować rozwiązanie tego problemu. kod jest
require_once("PHPMailer_v5.1/class.phpmailer.php");
require_once("PHPMailer_v5.1/language/phpmailer.lang-en.php");
$mailer = new PHPMailer();
$mailer->IsSMTP();
$mailer->SMTPAuth = true;
$mailer->SMTPSecure = "tls";
$mailer->Host = 'smtp.gmail.com';
$mailer->Port = 587;
$mailer->Username = "myuserid";
$mailer->Password = "mypassword";
$mailer->FromName = $fromname;
$mailer->From = "myuserid";
$mailer->AddAddress("[email protected]",$toname);
$mailer->Subject = $subject;
$mailer->Body =$content;
$mailer->AddCC("[email protected]", "bla");
$mailer->AddBCC("[email protected]", "test");
if(!$mailer->Send())
{
echo "Message was not sent";
}
else
echo "mail sent";