SMTPError: Password command Failed PHPMailer
Well, after a long battle I somehow managed to solve this. I activated DisplayUnlockCaptcha from the following URL:
https://accounts.google.com/b/0/DisplayUnlockCaptcha
Probably because Gmail might have viewed the logins received from PHP file lying in hosting server as untrusted requests. This is because the hosting servers may reside in different places or countries and the login authentication request received would appear different other than the one from where the Gmail account is logged in frequently. So as a security measure, it would have use some captcha mechanism in the background (which which cannot be viewed)
PHPMailer - SMTP ERROR: Password command failed
From your received answer: "invalid LOGIN encoding"... empty passwords decoded by that host results in something else than empty.
Looking at class.smtp.php (line 245):
fputs($this->smtp_conn, base64_encode($password) . $this->CRLF);
your empty string is encoded
and line 256:
echo "SMTP -> ERROR: " . $this->error["error"] .": " . $rply . $this->CRLF;
indicates than the message is created from the host, not the program.
My guess is not, it is not possible use empty passwords.
BTW, I never saw an email account without a password.
HIH,
PhpMailer SMTP ERROR Username command failed: 535 5.7.8
AuthType should solve your problem:
$mail->AuthType = 'LOGIN';
other options include: PLAIN, LOGIN, NTLM, CRAM-MD5, XOAUTH2
https://phpmailer.github.io/PHPMailer/classes/SMTP.html#method_authenticate
phpmailer username & password not accepted
I was able to solve my problem by going here:
https://myaccount.google.com/u/0/lesssecureapps
And set the Allow Secure Apps to On.
Once I made this update, I was able to send the email.
Related Topics
How to Increase Maximum Execution Time in PHP
PHP Simplexml How to Save the File in a Formatted Way
PHP.Ini & Smtp= - How to Pass Username & Password
How to Properly Url Encode a String in PHP
How to Loop Through Two Arrays At Once
Change Cart Item Prices in Woocommerce 3
MySQLi::Query(): Couldn't Fetch MySQLi
Parse Youtube Video Id Using Preg_Match
Nginx Serves .PHP Files as Downloads, Instead of Executing Them
How to Use Shell_Exec Without Waiting For the Command to Complete
PHP, Get File Name Without File Extension
Replacing Accented Characters PHP
Set Up the Base Url in Codeigniter