par
zak » 19 déc. 2011, 12:50
Salut,
A aucun endroit je vois : '
[email protected]' dans le code que tu as copier/coller, c'est normal?
Oui, juste sur From au lieu mon adresse je dois mettre
[email protected]
Mais maintenant voilà mon nouveau code
<?php
require("/var/www/phpmailer/class.phpmailer.php");
include("/var/www/phpmailer/class.smtp.php");
$mail = new PHPMailer();
$mail->SetLanguage('fr','/var/www/phpmailer/language/');
$mail->SMTPDebug = true;
$mail->IsSMTP(); // set mailer to use SMTP
$mail->Host = "smtp.gmail.com"; // specify main and backup server
$mail->SMTPAuth = true ; // turn on SMTP authentication
$mail->Username = "zakariabouchakor"; // SMTP username
$mail->Password = "******"; // SMTP password
$mail->Port = 465;
$mail->From = "
[email protected]";
$mail->FromName = "zakariabouchakor";
$mail->AddAddress("
[email protected]", "Josh Adams");
// name is optional
$mail->AddReplyTo("
[email protected]", "Information");
$mail->WordWrap = 50; // set word wrap to 50 characters
// optional name
$mail->IsHTML(true); // set email format to HTML
$mail->Subject = "Here is the subject";
$mail->Body = "This is the HTML message body <b>in bold!</b>";
$mail->AltBody = "This is the body in plain text for non-HTML mail clients";
if(!$mail->Send())
{
echo "Message could not be sent. <p>";
echo "Mailer Error: " . $mail->ErrorInfo;
exit;
}
echo "Message has been sent";
?>
et le code d 'erreur
SMTP -> FROM SERVER: SMTP -> FROM SERVER: SMTP -> ERROR: EHLO not accepted from server: SMTP -> FROM SERVER: SMTP -> ERROR: HELO not accepted from server: SMTP -> ERROR: AUTH not accepted from server: SMTP -> NOTICE: EOF caught while checking if connectedMessage could not be sent.
Mailer Error: L'adresse d'expéditeur suivante a échouée :
[email protected]
[quote="liens_geeks"]Salut,
A aucun endroit je vois : '
[email protected]' dans le code que tu as copier/coller, c'est normal?[/quote]
Oui, juste sur From au lieu mon adresse je dois mettre
[email protected]Mais maintenant voilà mon nouveau code
<?php
require("/var/www/phpmailer/class.phpmailer.php");
include("/var/www/phpmailer/class.smtp.php");
$mail = new PHPMailer();
$mail->SetLanguage('fr','/var/www/phpmailer/language/');
$mail->SMTPDebug = true;
$mail->IsSMTP(); // set mailer to use SMTP
$mail->Host = "smtp.gmail.com"; // specify main and backup server
$mail->SMTPAuth = true ; // turn on SMTP authentication
$mail->Username = "zakariabouchakor"; // SMTP username
$mail->Password = "******"; // SMTP password
$mail->Port = 465;
$mail->From = "
[email protected]";
$mail->FromName = "zakariabouchakor";
$mail->AddAddress("
[email protected]", "Josh Adams");
// name is optional
$mail->AddReplyTo("
[email protected]", "Information");
$mail->WordWrap = 50; // set word wrap to 50 characters
// optional name
$mail->IsHTML(true); // set email format to HTML
$mail->Subject = "Here is the subject";
$mail->Body = "This is the HTML message body <b>in bold!</b>";
$mail->AltBody = "This is the body in plain text for non-HTML mail clients";
if(!$mail->Send())
{
echo "Message could not be sent. <p>";
echo "Mailer Error: " . $mail->ErrorInfo;
exit;
}
echo "Message has been sent";
?>
et le code d 'erreur
SMTP -> FROM SERVER: SMTP -> FROM SERVER: SMTP -> ERROR: EHLO not accepted from server: SMTP -> FROM SERVER: SMTP -> ERROR: HELO not accepted from server: SMTP -> ERROR: AUTH not accepted from server: SMTP -> NOTICE: EOF caught while checking if connectedMessage could not be sent.
Mailer Error: L'adresse d'expéditeur suivante a échouée :
[email protected]