Fix “SMTP Error: Could not authenticate.” in WP Mail SMTP

Seeing SMTP Error: Could not authenticate. in WP Mail SMTP means the mail server rejected your login. The most common causes are wrong mailer choice (OAuth vs “Other SMTP”), an invalid username/password or app password, the wrong encryption/port, blocked outbound SMTP ports, or a From Email that your provider hasn’t verified.

This guide gives you fast, copy-paste fixes for Gmail/Google Workspace, Microsoft 365/Outlook, and Other SMTP senders. Plus how to read the debug code (e.g., 535 5.7.8) and confirm the issue is solved.

I keep getting “SMTP Error: Could not authenticate.” in WP Mail SMTP. How do I fix it?

Quick wins (fix most cases fast)

  1. Open WP Mail SMTP ▸ Settings ▸ Mailer and confirm you’re using the correct mailer for your account:
    • Gmail/Google Workspace → use the Gmail mailer (OAuth), not “Other SMTP”.
    • Microsoft 365/Outlook → use the Microsoft 365/Outlook mailer (OAuth), not “Other SMTP”.
    • SendGrid/Postmark/SES/SMTP host → use Other SMTP with the exact host/port/encryption they require.
  2. Match encryption ↔ port exactly:
    • TLS (STARTTLS) on 587 (most common)
    • SSL on 465

    Mismatches commonly trigger “Could not authenticate.”

  3. Username & Password: For Other SMTP, the username is usually the full email address. If your provider uses app passwords (e.g., Gmail personal or some hosts), generate one and use it here.
  4. From Email must be authorized: Many providers reject auth if your From Email isn’t verified with them (e.g., unverified domain in SES/SendGrid or a different mailbox in M365).
  5. Host firewall: Ask your host to allow outbound SMTP on 587/465 if tests fail.

Fix by mailer

Gmail / Google Workspace (recommended: OAuth “Gmail” mailer)

  1. Switch to Mailer: Gmail (OAuth).
  2. Click Allow plugin to send emails using your Google account and complete Google consent.
  3. Set From Email to the same Gmail/Workspace address you authorized.
  4. Save, then send a test under WP Mail SMTP ▸ Tools ▸ Email Test.

Using “Other SMTP” with Gmail? Personal Gmail now requires 2-Step Verification + an App Password. Create an app password in your Google Account, then use it as the SMTP password. For Workspace, your admin may restrict SMTP. OAuth (Gmail mailer) is the safest route.

Microsoft 365 / Outlook (recommended: OAuth “Microsoft 365/Outlook” mailer)

  1. Switch to Mailer: Microsoft 365 / Outlook (OAuth) and complete sign-in.
  2. Ensure your tenant admin has granted consent to the app, if prompted.
  3. Set From Email to the mailbox you authorized (or an alias that mailbox can send as).
  4. Save and send a test email. If you still see auth errors, re-connect the account (disconnect → connect) to refresh tokens.

Tip: If you previously used “Other SMTP” with basic auth, M365 may block it. Move to the OAuth mailer.

Other SMTP (SendGrid, Postmark, Amazon SES, your host’s SMTP)

  1. Host/Port/Encryption: Use the exact values your provider documents:
    • SendGrid: smtp.sendgrid.net, 587 (TLS). Username apikey, password is your API key.
    • Postmark: smtp.postmarkapp.com, 587 (TLS). Use your server API creds.
    • Amazon SES: Region-specific host (e.g., email-smtp.us-east-1.amazonaws.com), 587 (TLS). Use SMTP creds generated in SES.
    • cPanel/Host SMTP: Usually your domain or mail.yourdomain.com, 587 TLS with full mailbox username.
  2. From Email must be a verified sender/domain in that service (SES/SendGrid/Postmark). Unverified senders are rejected.
  3. Save and send a test. If it still fails, try switching Encryption between TLS 587 and SSL 465.

Read the error code like a pro

Open WP Mail SMTP ▸ Tools ▸ Email Test and enable Debug Output. Look for the SMTP server reply:

535 5.7.8 Username and Password not accepted
535 5.7.3 Authentication unsuccessful
534 5.7.14 Please log in via your web browser and then try again.
530 5.7.1 Authentication required
  • 535: Wrong credentials, bad app password, or the account isn’t allowed to send via this method. Re-check username/app password or move to OAuth.
  • 534/530: Provider wants stronger auth (OAuth), or needs browser login to unlock the account (Gmail security prompt).

Still stuck? Run this checklist

  • Mailer matches your provider (OAuth for Google/Microsoft; Other SMTP for SMTP-only providers).
  • Encryption/port pair is correct (TLS-587 or SSL-465).
  • From Email is authorized/verified with your provider.
  • App password used where required; copied without spaces.
  • Host opens outbound SMTP ports; security plugins or WAF aren’t blocking requests.

Bonus: deliverability (after auth works)

Authentication errors happen before sending. Once you’re sending, add SPF/DKIM/DMARC for the best inbox placement (follow your email provider’s DNS guide).

Helpful references: WP Mail SMTP · Google App Passwords · Microsoft SMTP Auth

I’m on Gmail and still see “535 5.7.8 Username and Password not accepted” using Other SMTP. What now?

Switch to the Gmail (OAuth) mailer. Google is phasing out basic SMTP auth. In WP Mail SMTP ▸ Settings ▸ Mailer, choose Gmail, connect your account, and set From Email to that same mailbox. Save and send a test. If you must use “Other SMTP,” enable 2-Step Verification and create an App Password, then use that as your SMTP password.

Microsoft 365 here, auth fails unless I use my web host’s SMTP. Any M365-specific fix?

Use the Microsoft 365/Outlook (OAuth) mailer instead of “Other SMTP.” Reconnect the account and have your tenant admin grant consent if prompted. Set From Email to the same mailbox (or one you can “send as”). Save and test. Basic SMTP may be blocked by policy. OAuth avoids that and is the recommended method.

Need human WordPress help?

WP Assistant is a free tool created by Atiba Software, a WordPress design and development company located in Nashville, TN. If you need more personalized WordPress assistance let us know, and we’ll get back to you ASAP!