Username (e.g. epiz_XXX) or Website URL
(please specify the website or account you are asking about)
Error Message
(please share the FULL error message you see)
Other Information
(other information and details relevant to your question)
Hello, please why phpmailer refuses to send mail. this problem my very tired if you have an idea disappointed please help me.
Ok, the first thing to is enable PHPMailer debug so we can find out what the actual issue is.
First of all, use this to debug the server:
$mail->SMTPDebug = 2;
Let us know what errors you see.
3 Likes
2021-05-10 08:45:29 SERVER → CLIENT: 220 smtp.gmail.com ESMTP s1sm26866018wmj.8 - gsmtp
2021-05-10 08:45:29 CLIENT → SERVER: EHLO datamobmee.xyz
2021-05-10 08:45:29 SERVER → CLIENT: 250-smtp.gmail.com at your service, [82.163.176.144]250-SIZE 35882577250-8BITMIME250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH250-ENHANCEDSTATUSCODES250-PIPELINING250-CHUNKING250 SMTPUTF8
2021-05-10 08:45:29 CLIENT → SERVER: AUTH LOGIN
2021-05-10 08:45:29 SERVER → CLIENT: 334 VXNlcm5hbWU6
2021-05-10 08:45:29 CLIENT → SERVER: [credentials hidden]
2021-05-10 08:45:29 SERVER → CLIENT: 334 UGFzc3dvcmQ6
2021-05-10 08:45:29 CLIENT → SERVER: [credentials hidden]
2021-05-10 08:45:29 SERVER → CLIENT: 534-5.7.9 Application-specific password required. Learn more at534 5.7.9 Sign in with app passwords - Google Account Help s1sm26866018wmj.8 - gsmtp
2021-05-10 08:45:29 SMTP ERROR: Password command failed: 534-5.7.9 Application-specific password required. Learn more at534 5.7.9 Sign in with app passwords - Google Account Help s1sm26866018wmj.8 - gsmtp
SMTP Error: Could not authenticate.
2021-05-10 08:45:29 CLIENT → SERVER: QUIT
2021-05-10 08:45:29 SERVER → CLIENT: 221 2.0.0 closing connection s1sm26866018wmj.8 - gsmtp
2021-05-10 08:45:29 SERVER → CLIENT: 220 smtp.gmail.com ESMTP p10sm2233986wmq.14 - gsmtp
2021-05-10 08:45:29 CLIENT → SERVER: EHLO campany.xyz
2021-05-10 08:45:29 SERVER → CLIENT: 250-smtp.gmail.com at your service, [82.163.176.144]250-SIZE 35882577250-8BITMIME250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH250-ENHANCEDSTATUSCODES250-PIPELINING250-CHUNKING250 SMTPUTF8
2021-05-10 08:45:29 CLIENT → SERVER: AUTH LOGIN
2021-05-10 08:45:29 SERVER → CLIENT: 334 VXNlcm5hbWU6
2021-05-10 08:45:29 CLIENT → SERVER: [credentials hidden]
2021-05-10 08:45:29 SERVER → CLIENT: 334 UGFzc3dvcmQ6
2021-05-10 08:45:29 CLIENT → SERVER: [credentials hidden]
2021-05-10 08:45:30 SERVER → CLIENT: 534-5.7.9 Application-specific password required. Learn more at534 5.7.9 Sign in with app passwords - Google Account Help p10sm2233986wmq.14 - gsmtp
2021-05-10 08:45:30 SMTP ERROR: Password command failed: 534-5.7.9 Application-specific password required. Learn more at534 5.7.9 Sign in with app passwords - Google Account Help p10sm2233986wmq.14 - gsmtp
SMTP Error: Could not authenticate.
2021-05-10 08:45:30 CLIENT → SERVER: QUIT
2021-05-10 08:45:30 SERVER → CLIENT: 221 2.0.0 closing connection p10sm2233986wmq.14 - gsmtp
SMTP connect() failed. Troubleshooting · PHPMailer/PHPMailer Wiki · GitHub
SMTP connect() failed. Troubleshooting · PHPMailer/PHPMailer Wiki · GitHub
Ok, i’m assuming this is to do with the way Google’s security works. Somewhere in your settings there is an option that says ‘enable less secure apps’ (Use google to find where it is). Please enable this option and see if that helps.
4 Likes
Oxy
May 10, 2021, 9:51am
6
you even have a link in that log that leads here Sign in with app passwords - Google Account Help
5 Likes
here is the new error after following the google help instruction
2021-05-10 13:55:45 SMTP ERROR: Failed to connect to server: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. (10060)
SMTP connect() failed. Troubleshooting · PHPMailer/PHPMailer Wiki · GitHub
Message could not be sent. Mailer Error: SMTP connect() failed. Troubleshooting · PHPMailer/PHPMailer Wiki · GitHub
Well did you check out the new link in the logs?
Right, looking through the error logs, I can see see partly whats causing the issue. Can you please share the code you are using on your website?
system
Closed
May 26, 2021, 6:49am
11
This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.