So I would like to send a email via a smtp server but it won't work.
require_once "PHPMailer/class.phpmailer.php";
$mail = new PHPmailer();
$mail->SetLanguage("fr", "PHPMailer/language/");
$sujet = 'Hello World';
$texteHTML =
'<html>
<body>
<h1>Test envoi</h1>
</body>
</html>';
$mail->IsSMTP();
$mail->SMTPDebug = 3;
$mail->IsHTML(true);
$mail->Host= 'smtp.orange.fr'; // Serveur SMTP
$mail->From= '******@*****.fr';
// Authentification
$mail->SMTPAuth=true;
$mail->Username = '*******'; // SMTP username
$mail->Password = ''; // The password is really empty, nada, nothing. Is it possible ?
$mail->Port = 25;
$adresse = '*****@gmail.com';
$mail->AddAddress($adresse);
$mail->Subject=$sujet;
$mail->Body=$texteHTML;
$erreur=false;
if(!$mail->Send())
{
echo "PHPMailer - ";
echo $mail->ErrorInfo; //Affiche le message d'erreur
echo "";
$erreur=true;
}
$mail->SmtpClose();
unset($mail);
And i get this error
2014-02-04 14:21:52 CLIENT -> SERVER:
2014-02-04 14:21:52 SERVER -> CLIENT: 501 5.7.0 invalid LOGIN encoding
2014-02-04 14:21:52 SMTP ERROR: Password command failed: 501 5.7.0 invalid LOGIN encoding
2014-02-04 14:21:52 CLIENT -> SERVER: QUIT
My login and password are right. Does PHPMailer work if there is no password ?
Thx for your time.