Home >Backend Development >PHP Tutorial >Why Is My PHPMailer Getting an \'SMTP ERROR: Password command failed\' on a Shared Server?

Why Is My PHPMailer Getting an \'SMTP ERROR: Password command failed\' on a Shared Server?

Patricia Arquette
Patricia ArquetteOriginal
2024-11-24 10:58:11654browse

Why Is My PHPMailer Getting an

PHPMailer: Resolving SMTP Password Failure When Sending Mail from Server

When utilizing PHPMailer script to send emails from a shared server, you may encounter the error message "SMTP ERROR: Password command failed." Despite seemingly correct script configurations, this issue can arise.

To troubleshoot this error with GMail as the SMTP server, you should:

  1. Enable "Less Secure Apps":

    • Visit https://www.google.com/settings/u/1/security/lesssecureapps and enable access for less secure apps. This will allow PHPMailer to use your GMail credentials.
  2. Disable Suspicious Activity Block:

    • Go to https://security.google.com/settings/security/activity?hl=en&pli=1 and authorize any suspicious attempts to access your account. This can occur if PHPMailer is making multiple login attempts in a short period.
  3. Clear Captcha Verification:

    • Navigate to https://accounts.google.com/b/0/DisplayUnlockCaptcha and click "Continue" to clear any potential captcha issues. This step may be necessary if you've been repeatedly attempting to log in.

After implementing these steps, you should be able to successfully send emails using PHPMailer from your VPS shared server.

The above is the detailed content of Why Is My PHPMailer Getting an \'SMTP ERROR: Password command failed\' on a Shared Server?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn