SMTP Error: Password Command Failed When Sending Email from Server
Problem:
Despite using the correct PHPMailer settings and GMail credentials, an error occurs when attempting to send email from a shared server. The error message reads: "SMTP connect() failed" with a 534 response indicating that the password command has failed.
Solution:
Contrary to the assumption that the PHP script is error-free, the issue lies in Google's security measures. When an application attempts to access a GMail account, Google may flag it as potentially suspicious due to:
Resolution:
To resolve this issue, the following steps are recommended:
By completing these steps, the security measures implemented by Google will be bypassed. However, it's worth noting that using less secure applications may affect the security of the email account, so it's prudent to weigh the risks and benefits before enabling them.
The above is the detailed content of Why Does My Server Get an \'SMTP Password Command Failed\' Error When Sending Emails via Gmail?. For more information, please follow other related articles on the PHP Chinese website!