problème avec phpmailer

Répondre


Cette question est un moyen d’empêcher des soumissions automatisées de formulaires par des robots.
Smileys
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :!: :?: :idea: :arrow: :| :mrgreen: =D> #-o =P~ :^o :non: :priere: 8-|
Voir plus de smileys
  Revue du sujet
 

  Étendre la vue Revue du sujet : problème avec phpmailer

Re: problème avec phpmailer

par light86 » 05 avr. 2011, 23:02

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

Re: problème avec phpmailer

par Ryle » 05 avr. 2011, 22:53

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...

problème avec phpmailer

par light86 » 05 avr. 2011, 19:20

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