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
| include ("phpmailer/class.phpmailer.php");
$mail = new PHPmailer();
$mail->IsSMTP();
$mail->Host='smtp.live.com';
$mail->Encoding = "8bit";
$mail->CharSet = "iso-8859-1";
$mail->IsHTML(true);
$mail->From='fmpf_stage@hotmail.fr';
$mail->FromName="Mon nom";
$mail->Username='fmpf_stage@hotmail.fr';
$mail->Password='xxxxxxxxxxxx';
$mail->SMTPAuth=true;
$mail->SMTPDebug=true;
$mail->AddAddress('xxxxxxxxxxxx@hotmail.fr');
$mail->AddReplyTo('fmpf_stage@hotmail.fr');
$mail->Subject='Sujet';
$mail->Body="<html>.... Code HTML ....</html>";
if(!$mail->Send())
{
echo $mail->ErrorInfo;
}
else
{
echo "émail envoyé";
}
$mail->SmtpClose();
unset($mail); |