Bonjour,
J'aimerais configurer la fonction copie cachée bcc sur le script phpmailer, pour envoyer un mailing environs 50 mails à la fois.
Voici le code que j'ai trouvé pour la fonction bcc.
$mail->AddBCC("mon@supermail.com","Antoine BCC")
Voici le code que j'utilise pour envoyer.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
| <?php
$address = 'info@aaa.com;
include_once('../class.phpmailer.php');
$mail = new PHPMailer(); // defaults to using php "mail()"
$body = $mail->getFile('contents.html');
$body = eregi_replace("[\]",'',$body);
$mail->From = "mailing@cccc.com";
$mail->FromName = "GROUP Mailing";
$mail->Subject = "PHPMailer Test Subject via mail()";
$mail->AltBody = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test
$mail->MsgHTML($body);
$mail->AddAddress("aa@gg.com", "Antoine GW");
$mail->AddAttachment(""); // attachment
$mail->AddBCC("mailing@cccc.com", "Antoine BCC")
if(!$mail->Send()) {
echo "Mailer Error: " . $mail->ErrorInfo;
} else {
echo "Message sent!";
}
?> |
Merci d'avance pour votre aide importante.
Partager