Estou a ter problemas com o bcc no phpmailer, quando adiciono um, não corre o código.
Código (PHP):
Código (PHP):
Resolve o problema, em vez de AddBcc era AddBCC
Mas deparei-me com outro. Se alguem registar-se com um email tipo "123123@123.123" ele depois dá erro e não envia email nenhum. Dá um erro
Message was not sent.Mailer error: Language string failed to load: recipients_failed123123@123.123
Código (PHP):
<?php
require("class/phpmailer/class.phpmailer.php");
$mail = new PHPMailer();
$mail->SetLanguage("pt", 'class/phpMailer/language/');
$mail->IsSMTP(); // telling the class to use SMTP
$mail->From = "vttsokalo@gmail.com";
$mail->AddAddress("email1@hotmail.com","1");
$mail->AddAddress("email2@gmail.com","2");
$mail->Subject = "First PHPMailer Message";
$mail->Body = "Hi! \n\n This is my first e-mail sent through PHPMailer.";
$mail->WordWrap = 50;
if(!$mail->Send()) {
echo 'Message was not sent.';
echo 'Mailer error: ' . $mail->ErrorInfo;
} else {
echo 'Message has been sent.';
}
?>
Se, por exemplo, depois de "$mail->AddAddress("email2@gmail.com","2");" pusesserequire("class/phpmailer/class.phpmailer.php");
$mail = new PHPMailer();
$mail->SetLanguage("pt", 'class/phpMailer/language/');
$mail->IsSMTP(); // telling the class to use SMTP
$mail->From = "vttsokalo@gmail.com";
$mail->AddAddress("email1@hotmail.com","1");
$mail->AddAddress("email2@gmail.com","2");
$mail->Subject = "First PHPMailer Message";
$mail->Body = "Hi! \n\n This is my first e-mail sent through PHPMailer.";
$mail->WordWrap = 50;
if(!$mail->Send()) {
echo 'Message was not sent.';
echo 'Mailer error: ' . $mail->ErrorInfo;
} else {
echo 'Message has been sent.';
}
?>
Código (PHP):
$mail->AddBcc("email3@gmail.com","nome3");
O script deixa de funcionar e não envia nada a lado nenhum.Resolve o problema, em vez de AddBcc era AddBCC
Mas deparei-me com outro. Se alguem registar-se com um email tipo "123123@123.123" ele depois dá erro e não envia email nenhum. Dá um erro
Message was not sent.Mailer error: Language string failed to load: recipients_failed123123@123.123