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
require "phpmailer/class.phpmailer.php";
$mail = new PHPmailer();
$mail->IsSMTP();
$mail->IsHTML(true);
$mail->Host='smtp.laposte.net';
$mail->Port=587;
$mail->Username = 'pou*******@laposte.net'; // SMTP login
$mail->Password = '******'; // SMTP password
$mail->SMTPAuth = true; // Active l'uthentification par smtp
$mail->SMTPSecure = 'tls';
$mail->From='pou*******@laposte.net';
$mail->AddAddress('pou******@laposte.net');
$mail->AddReplyTo('pou********@laposte.net');
$envoi_mail_body = "$r1, $r2, $r3, $r4, $r5, $r6, $r7, $r8, $r9, $r10, $res" ;
$headers = "$res";
$mail->Subject=$headers;
$mail->Body.=$envoi_mail_body ;
if(!$mail->Send()){ //Teste si le return code est ok.
echo $mail->ErrorInfo; //Affiche le message d'erreur
}
else{
echo '';
}
$mail->SmtpClose();
unset($mail);
?> |
Partager