PHPMailer - SMTP ERROR: Password command failed when send mail from my server

This error message typically indicates that the SMTP server is unable to authenticate the provided login credentials for the email account being used to send the email. This could be caused by a number of things, such as an incorrect password, an incorrect username, or issues with the server's authentication settings.

To troubleshoot this issue, you should first verify that the login credentials being used by PHPMailer are correct. You may also want to try logging in to the email account using the same credentials via a web interface to ensure that the account is active and that the login information is correct.

Watch a course Learn object oriented PHP

If the login credentials are correct, then you should check the SMTP server's authentication settings. Make sure that the server is configured to allow SMTP authentication, and that the specific login method being used by PHPMailer (e.g. PLAIN, LOGIN, CRAM-MD5, etc.) is supported.

If you are still unable to resolve the issue, you may want to check the server's log files for more detailed information about the error. This could provide additional clues as to what is causing the problem.

Other things to check:

  • Check the email account is not blocked by the email service provider,
  • check the email account is not out of quota,
  • check the IP address or domain of your server is not blacklisted.
  • Consider using different SMTP host, if possible.