ornythorink
vendredi 22 juin 2007 à 15:19
Merci Dan
Donc j'ai suivi ce que tu m'a dit j'ai edité /etc/tcp.smtp
j'ai rajouté cette ligne:
CODE
88.163.33.64.:allow,RELAYCLIENT=""
à l'ip de localhost
j'ai saisi la ligne de commande que ma donné
Maintenant j'ai ça:
CODE
Message was not sent
Mailer Error: The following From address failed: greg_AT_experts-referencement.com
pour ce code qui m'a servi a tester:
CODE
require("class.phpmailer.php");
require("class.smtp.php");
$mail = new PHPMailer();
$mail->IsSMTP(); // send via SMTP
$mail->Host = "smtp.experts-referencement.com"; // SMTP servers
$mail->SMTPAuth = true; // turn on SMTP authentication
$mail->Username = "XXXX"; // SMTP username
$mail->Password = "XXXXXX"; // SMTP password
$mail->From = "jc_AT_experts-referencement.com";
$mail->FromName = "Mailer";
$mail->AddAddress("greg_AT_experts-referencement.com");
$mail->WordWrap = 50; // set word wrap
$mail->IsHTML(true); // send as HTML
$mail->Subject = "Here is the subject";
$mail->Body = "This is the <b>HTML body</b>";
$mail->AltBody = "This is the text-only body";
if(!$mail->Send())
{
echo "Message was not sent <p>";
echo "Mailer Error: " . $mail->ErrorInfo;
exit;
}
echo "Message has been sent";
// send as HTML
if(!$mail->Send())
{
echo "Message was not sent <p>";
echo "Mailer Error: " . $mail->ErrorInfo;
exit;
}
Est ce quej'ai oublié quelquechose en route ou c'est c'est mon utilisation de PHPmailer qui est mauvaise ?