Page 1 sur 1

problème avec phpmailer

Posté : 05 avr. 2011, 19:20
par light86

Code : Tout sélectionner

$mail = new PHPMailer(); //$body = file_get_contents('examples/contents.html"); // $mail->getFile(...) is invalid ! $body = "<body style=\"margin: 10px;\"> <div style=\"width: 640px; font-family: Arial, Helvetica, sans-serif; font-size: 11px;\"> <br> &nbsp;This is a test of PHPMailer.<br> <br> This particular example uses <strong>HTML</strong>, with a <div> tag and inline<br> styles.<br> </div> </body> "; $mail->IsSMTP(); $mail->SMTPAuth = true; // enable SMTP authentication $mail->SMTPSecure = "ssl"; // sets the prefix to the servier $mail->Host = "smtp.gmail.com"; // sets GMAIL as the SMTP server $mail->Port = 465; // set the SMTP port $mail->Username = "[email protected]"; // GMAIL username $mail->Password = "*********"; // GMAIL password $mail->From = "[email protected]"; $mail->FromName = "*********"; //$mail->Subject = "This is the subject"; //$mail->AltBody = "This is the body when user views in plain text format"; //Text Body //$mail->WordWrap = 50; // set word wrap //$mail->MsgHTML($body); $mail->Body='Voici un exemple d\'e-mail au format Texte'; //$mail->AddReplyTo("[email protected]","JP"); //$mail->AddAttachment("C:/Development/ToolsPHP/PHPMailer_v5.1/examples/images/phpmailer.gif"); // attachment $mail->AddAddress("[email protected]"); //$mail->IsHTML(true); // send as HTML if(!$mail->Send()) { echo "Mailer Error: " . $mail->ErrorInfo; } else { echo "Message has been sent"; }
Fatal error: Maximum execution time of 30 seconds exceeded in C:\wamp\www\test\index.php on line 2

Re: problème avec phpmailer

Posté : 05 avr. 2011, 22:53
par Ryle
Ah ben ça, c'est pas de bol dis donc...


A part ça, si à l'occasion tu as besoin d'aide ou d'explications en php, n'hésite pas à venir nous saluer et on se fera une joie de répondre à tes questions si tu en as...

Re: problème avec phpmailer

Posté : 05 avr. 2011, 23:02
par light86
slt j'ai une question simple comment je peut faire je suis perdu j'ai cherché sur le net des exemples ca ne marche pas
j'ai essayez de configuer SMTP local sans authentification
pourriez vous m'aidez c'est mon sujet de pef
merci