SMTP erreur

Résolu
debtech Messages postés 12 Date d'inscription   Statut Membre Dernière intervention   -  
jordane45 Messages postés 38486 Date d'inscription   Statut Modérateur Dernière intervention   -
Bonjour,

Besoin d'aide s'il vous plait, j'utilise PHPMailer pour l'envoi de mail de mes formulaires. J'uilise les parametres SMTP de gmail
#
$mail->IsSMTP();
    $mail->SMTPDebug = 3;
    $mail->SMTPAuth = TRUE;
    $mail->SMTPSecure = "ssl";
    $mail->Port     = 465;  
    $mail->Username = "xxx@gmail.com";
    $mail->Password = "passwordxxx";
    $mail->Host     = "smtp.gmail.com";
    $mail->Mailer   = "smtp";
    $mail->SetFrom("xxx@gmail.com");
    $mail->AddAddress("reception@gmail.com"); 
    $mail->Subject = "Mail";
#

, en local les mails passent et je n'ai aucun message d'erreur. Mais quand j'utilise les memes parametres sur mon serveur LWS j'ai une erreur

2020-03-28 16:17:47 Connection: opening to ssl://smtp.gmail.com:465, timeout=300, options=array()
2020-03-28 16:17:47 Connection: opened
2020-03-28 16:17:47 SERVER -> CLIENT: 220 smtp.gmail.com ESMTP u11sm13280693wrt.29 - gsmtp
2020-03-28 16:17:47 CLIENT -> SERVER: EHLO test.cstechdev.net
2020-03-28 16:17:47 SERVER -> CLIENT: 250-smtp.gmail.com at your service, [91.234.195.181]250-SIZE 35882577250-8BITMIME250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH250-ENHANCEDSTATUSCODES250-PIPELINING250-CHUNKING250 SMTPUTF8
2020-03-28 16:17:47 CLIENT -> SERVER: AUTH LOGIN
2020-03-28 16:17:47 SERVER -> CLIENT: 334 VXNlcm5hbWU6
2020-03-28 16:17:47 CLIENT -> SERVER: [credentials hidden]
2020-03-28 16:17:47 SERVER -> CLIENT: 334 UGFzc3dvcmQ6
2020-03-28 16:17:47 CLIENT -> SERVER: [credentials hidden]
2020-03-28 16:17:48 SERVER -> CLIENT: 534-5.7.14 <https://accounts.google.com/signin/continue?sarp=1&scc=1&plt=AKgnsbu534-5.7.14 _o-ss5Ffi1k5FRHmxSJxqyp5_c1iv7ALcZ30qlOoTVhRtGuH7Sa9_xNuw-1kVEwmnJhBh534-5.7.14 G2Yo0Olaov6tKyRglYiUNVN4cPJ1fhKxrHa6vBGdQknRZfA6ceTBpSw9_iv9_5YA>534-5.7.14 Please log in via your web browser and then try again.534-5.7.14 Learn more at534 5.7.14 https://support.google.com/mail/answer/7126229?visit_id=637243059728697425-4085660714&rd=2#cantsignin u11sm13280693wrt.29 - gsmtp
2020-03-28 16:17:48 SMTP ERROR: Password command failed: 534-5.7.14 <https://accounts.google.com/signin/continue?sarp=1&scc=1&plt=AKgnsbu534-5.7.14 _o-ss5Ffi1k5FRHmxSJxqyp5_c1iv7ALcZ30qlOoTVhRtGuH7Sa9_xNuw-1kVEwmnJhBh534-5.7.14 G2Yo0Olaov6tKyRglYiUNVN4cPJ1fhKxrHa6vBGdQknRZfA6ceTBpSw9_iv9_5YA>534-5.7.14 Please log in via your web browser and then try again.534-5.7.14 Learn more at534 5.7.14 https://support.google.com/mail/answer/7126229?visit_id=637243059728697425-4085660714&rd=2#cantsignin u11sm13280693wrt.29 - gsmtp
SMTP Error: Could not authenticate.
2020-03-28 16:17:48 CLIENT -> SERVER: QUIT
2020-03-28 16:17:48 SERVER -> CLIENT: 221 2.0.0 closing connection u11sm13280693wrt.29 - gsmtp
2020-03-28 16:17:48 Connection: closed
SMTP Error: Could not authenticate.
Message non envoyé, veuillez réessayer.


EDIT : Ajout des balises d code

1 réponse

jordane45 Messages postés 38486 Date d'inscription   Statut Modérateur Dernière intervention   4 752
 
Bonjour,

Commence par suivre les indications fournies par le lien qui se trouve dans le message d'erreur.
Si les soucis persistent, contactez le support de votre hébergeur. Cela n'a pas de rapport avec le langage PHP
2