SMTP Error: Could not authenticate WordPress Origin: Application & API Last updated 14 Oct 2026

WordPress / PHPMailer: SMTP Error: Could not authenticate / SMTP connect() failed

The SMTP server rejected the login or couldn’t be reached — wrong credentials, app passwords required, wrong port/encryption, or outbound SMTP blocked.

Exact message you may see SMTP Error: Could not authenticateSMTP connect() failedSMTP Error: Could not connect to SMTP host535 5.7.8 Username and Password not accepted
Seen on: WordPress

Meaning

Gmail/Microsoft 365 require app passwords or OAuth; basic auth may be disabled. Hosts often block ports 25/465/587 outbound. Port and encryption must match (587+TLS, 465+SSL).

Common causes

  • Wrong username/password or app password needed
  • Provider disabled basic SMTP auth (Microsoft 365)
  • Port/encryption mismatch
  • Outbound SMTP ports blocked by host

⚡ Quick fix

  1. Use an app password or the provider’s OAuth/API mailer
  2. Match port and encryption (587 STARTTLS / 465 SSL)
  3. Test connectivity from the server

Detailed fix by platform

Shell

  1. php
    openssl s_client -starttls smtp -connect smtp.gmail.com:587 -crlf </dev/null | head -5
    nc -vz smtp.example.com 587

How to diagnose

  1. Credentials — App password?
  2. Network — Port reachable?
  3. Settings — Port/encryption pair

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Application & API. Errors that are often confused with or caused by this one (click to open):

403 Forbidden wp-admin — WordPress: 403 Forbidden on wp-admin, wp-login.php or admin-ajax.php (WordPress)403 Forbidden wp-admin404 except homepage — WordPress: 404 Not Found on every page except the homepage (permalinks / .htaccess / Nginx rules) (WordPress)404 except homepage550 5.1.1 — 550 5.1.1 The email account that you tried to reach does not exist (User unknown) (Email / SMTP)550 5.1.1550 5.7.1 — 550 5.7.1 Relaying denied / Message rejected as spam / Unauthenticated email not accepted (Email / SMTP)550 5.7.1550 5.7.26 — 550 5.7.26 This mail has been blocked because the sender is unauthenticated (SPF/DKIM/DMARC) (Email / SMTP)550 5.7.26Another update is currently in progress — WordPress: Another update is currently in progress. (WordPress)Another update is cur…Are you sure you want to do this? — WordPress: Are you sure you want to do this? Please try again. (nonce check failed) (WordPress)Are you sure you want…MessageRejected — SES MessageRejected: Email address is not verified. The following identities failed the check in region (AWS)MessageRejectedSMTP Erro…

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.