Bonjour,
je n'arrive pas à résoudre un problème avec PHPMAILERS, l'entreprise ma donner sont SMTP et une adresse mail. J'effectue les teste sur le serveur de l'entreprise.
J'ai mis cette configuration :
mais j'ai cette erreur :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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 ////////////////////////////////// /// envoye de l'email -- programme/// ////////////////////////////////// include "phpmailer/class.phpmailer.php"; $mail = new PHPMailer(); $mail->IsSMTP(); // telling the class to use SMTP $mail->SMTPDebug = 2; $mail->Host = "smtp.entreprise.org"; // SMTP server $mail->From = "noreply@entreprise.org"; $mail->FromName = "entreprise.org"; $mail->AddAddress($email); $mail->WordWrap = 50; // set word wrap $mail->IsHTML(true); // send as HTML $mail->Subject = "sujet"; $mail->Body = "<html><body>Mail de confirmation <body></html>"; $mail->AltBody = "This is the text-only body"; if(!$mail->Send()) { echo "Message was not sent <p>"; echo "Mailer Error: " . $mail->ErrorInfo; exit; }
SMTP -> FROM SERVER: 220 ns35418.ovh.net ESMTP SMTP -> FROM SERVER: 250-ns35418.ovh.net 250-PIPELINING 250-STARTTLS 250-8BITMIME 250 SIZE 0 SMTP -> FROM SERVER: 250 ok SMTP -> FROM SERVER: 553 sorry, that domain isn't allowed to be relayed thru this MTA (#5.7.1) SMTP -> ERROR: RCPT not accepted from server: 553 sorry, that domain isn't allowed to be relayed thru this MTA (#5.7.1) SMTP -> FROM SERVER: 250 flushed Message was not sent
Mailer Error: Language string failed to load: recipients_failed ttt@hotmail.com
et si je remplace $mail->Host = "smtp.entreprise.org"; par
$mail->Host ="localhost"
j'ai cette erreur :
Warning: fsockopen() [function.fsockopen]: unable to connect to localhost:25 (Connection refused) in /home/supinfo_gamesud1/phpmailer/class.smtp.php on line 105
SMTP -> ERROR: Failed to connect to server: Connection refused (111) Message was not sent
Mailer Error: Language string failed to load: connect_host
Sa fait pas mal de temps que je cherche mais j'ai rien trouver.
Partager