Troubleshooting · Troubleshooting
How to Fix "SMTP Error: Could Not Authenticate"
Short answer
The “SMTP Error: Could Not Authenticate” message means WordPress reached your mail server but the server refused the login. The most common cause is a wrong password: Gmail no longer accepts a normal account password for SMTP, so use a 16-character app password or switch to the Google/Gmail mailer. Check the username, port, and encryption pair, then send a test email.
Key takeaways
- The error means the connection worked but the login was refused.
- Gmail needs a 16-character app password, not a normal password, for SMTP.
- App passwords need 2-Step Verification turned on first.
- SSL pairs with port 465 and TLS pairs with port 587.
- Changing a Google password cancels all app passwords.
- Microsoft 365 may need SMTP AUTH turned on per mailbox.
What does “SMTP Error: Could Not Authenticate” mean?
The error means WordPress reached your mail server, but the server refused the login.
The connection worked, so the host, port, and network path are fine. The username, password, or account setting is wrong, or the account blocks this kind of login.
It is different from a connection error. “Could not connect to SMTP host” means WordPress never reached the server, while “Could not authenticate” means it got there and the door stayed shut.
What should you check first?
Check the login details before you change ports or plugins, because a wrong password is the most common cause.
- The SMTP username is the full email address, not just the part before the @ sign.
- The SMTP password is the one for that mailbox, typed with no extra spaces.
- Authentication is switched on in the SMTP plugin settings.
- The From Email matches the mailbox you sign in with.
- The mailbox is not locked after too many failed login attempts.
Re-type the password by hand instead of pasting it, then send a test email. Pasting can add a hidden space at the start or end, and a single wrong character is enough to refuse the login.
If the login still fails, note which mailbox you use. Gmail, Microsoft 365, and a host mailbox each have their own rules, and the next sections cover each one.
How do you fix it for Gmail?
Use a Gmail app password, or switch to the Google/Gmail mailer, because Gmail no longer accepts a normal account password for SMTP.
Google removed the Less Secure Apps setting, so a Gmail address and password typed into an SMTP plugin stopped working, WP Mail SMTP explains. The fix is to switch to the Gmail mailer, or keep the Other SMTP mailer and swap the password for a Gmail app password.
An app password is a 16-digit passcode, and it only works on accounts with 2-Step Verification turned on, Google Account Help explains. Turn on 2-Step Verification first, then create the app password and copy the 16 characters at once, because Google will not show them again.
Enter these settings in WP Mail SMTP → Settings, under Other SMTP, WP Mail SMTP's setup guide explains:
| Setting | Value for Gmail |
|---|---|
| SMTP Host | smtp.gmail.com |
| Encryption | TLS |
| SMTP Port | 587 |
| Authentication | On |
| SMTP Username | Your full Gmail address |
| SMTP Password | The 16-character app password |
Changing your Google account password cancels your app passwords, Google Account Help explains. If email stops after a password change, create a new app password and paste it into the SMTP settings.
The other option is the Google/Gmail mailer, which connects through Google's API instead of the SMTP protocol, WP Mail SMTP explains. It needs a Google Cloud project and a one-time authorization, and it avoids storing any password in WordPress.
How do you fix it for Microsoft 365?
Check that SMTP AUTH is switched on for the mailbox, because Microsoft 365 often has it switched off by default.
Microsoft's setup guide gives smtp.office365.com as the host and port 587 as the recommended port for client SMTP submission, Microsoft Learn explains.
SMTP AUTH is disabled for organizations created after January 2020, and it can be enabled per mailbox, Microsoft Learn explains. If security defaults is on in your organization, SMTP AUTH is already disabled, and you need to switch security defaults off before it can work.
Ask a Microsoft 365 admin to enable Authenticated SMTP for that mailbox in the Microsoft 365 admin center, under Users → Active users → Mail → Manage email apps. Then send a test email from WordPress.
If the mailbox uses multi-factor authentication, a normal password will not work for SMTP. Use the Microsoft 365 mailer in WP Mail SMTP, which signs in with OAuth, or ask the admin about an app password for that account.
How do you fix it for a host or cPanel mailbox?
Use the mailbox password and the host's own server name, because a host mailbox follows the host's rules, not Gmail's.
Find the mail settings in your hosting panel, usually under Email Accounts → Connect Devices. The page lists the incoming and outgoing server names, the ports, and whether to use SSL or TLS.
SSL pairs with port 465 and TLS pairs with port 587, WP Mail SMTP's setup guide explains. Mixing them up is a common cause of login failures: SSL on port 587 or TLS on port 465 will not connect.
Log in to webmail with the same address and password first. If webmail rejects the password, the mailbox password is wrong or the mailbox is locked, and no SMTP setting will fix it. Reset the password in the hosting panel, then update the SMTP plugin.
If webmail works but WordPress still fails, check that the username is the full email address. Some hosts accept the short username in webmail but need the full address for SMTP.
What if the port is blocked?
A blocked port looks like a timeout, not an authentication error, but it is worth ruling out when nothing else works.
Many hosts block outbound SMTP ports 587 and 465 to stop spam, and the block is silent: the plugin waits until the connection times out. Ask the host whether outbound SMTP is open for your account.
If the port is blocked, switch to a mailer that uses HTTPS on port 443, which hosts do not block. The Google/Gmail mailer and the Microsoft 365 mailer both sign in with OAuth over HTTPS, WP Mail SMTP explains.
A connection that times out after 30 seconds or more points at a blocked port or a firewall. An instant “Could not authenticate” reply points at the login details instead, so do not chase the port when the error comes back at once.
If a form never sends at all, the cause may sit before SMTP. How to fix a contact form not sending email covers the form side of the same problem.
How do you confirm email works again?
Email works again when a test message arrives in the inbox, not just when the plugin reports no error.
- Open WP Mail SMTP → Tools → Email Test and send a message to an address you control.
- Check the inbox and the spam folder for the test message.
- Open WP Mail SMTP → Tools → Email Log, if logging is on, and confirm the message shows as sent.
- Submit a real form on the site, such as the contact form, and confirm that message arrives too.
- Check the From address on the received message matches the mailbox you configured.
If the test email arrives but form mail does not, the form plugin may use a different From address. How to fix WPForms not sending email covers that case.
Set up SPF, DKIM, and DMARC for your sending domain next, because authentication at the mailbox is only half the job. How to set up SPF, DKIM, and DMARC for WordPress email walks through the DNS records.
What mistakes should you avoid?
Most SMTP authentication errors come back because one setting was left half fixed.
- Using a normal Gmail password instead of an app password or the Gmail mailer.
- Pasting a password with a hidden space at the start or end.
- Mixing up the pairs: SSL with port 587, or TLS with port 465.
- Changing a Google password and forgetting that it cancels all app passwords.
- Running two mail plugins at once, so you cannot tell which one sent the message.
- Skipping the test email and assuming the save worked.
Frequently asked questions
Why did my Gmail SMTP stop working after years of working?
Google removed the Less Secure Apps setting, so Gmail no longer accepts a normal account password for SMTP. Create a 16-character app password with 2-Step Verification on, or switch to the Google/Gmail mailer in WP Mail SMTP, which signs in through Google's API instead of SMTP.
Where do I find the Gmail app password setting?
Turn on 2-Step Verification in your Google Account first, because app passwords only appear after that. Then open the App Passwords page in your Google Account security settings, name the password for your site, and copy the 16 characters shown. Paste them into the SMTP password field.
What is the difference between SSL and TLS for SMTP?
Both encrypt the connection, but they pair with different ports. SSL uses port 465, and TLS uses port 587. Picking SSL with port 587, or TLS with port 465, will not connect. In WP Mail SMTP the port changes on its own when you pick the encryption.
My Microsoft 365 login works in Outlook but not in WordPress. Why?
Outlook uses modern sign-in, while SMTP uses SMTP AUTH, which Microsoft often has switched off. SMTP AUTH is disabled for organizations created after January 2020 and when security defaults are on. Ask a Microsoft 365 admin to enable Authenticated SMTP for that mailbox, or use the Microsoft 365 mailer with OAuth.
Should I use one SMTP plugin or two?
Use one. Two mail plugins can fight over WordPress mail, and you cannot tell which one sent a message or which setting is wrong. Pick WP Mail SMTP or one alternative, configure it fully, and deactivate the other before you send a test email.
Sources
- Sign in with App Passwords Google Account Help
- Gmail Is Disabling Less Secure Apps WP Mail SMTP
- How to Set Up the Other SMTP Mailer WP Mail SMTP
- How to Set Up a Multifunction Device or Application to Send Email Using Microsoft 365 Microsoft Learn
- Enable or Disable SMTP AUTH in Exchange Online Microsoft Learn
- WP Mail SMTP WordPress.org
Is your product missing, or something out of date?
Tell us what to add or correct. We read every note and reply when we need a source. A message does not buy a ranking.
Thanks — we review requests within 3 business days.
