Fix “There was a problem while sending the test email” in WP Mail SMTP

Seeing “There was a problem while sending the test email.” in WP Mail SMTP with this extra line:

This means we were able to connect to your SMTP host, but were not able to proceed using the email/password in the settings.

In plain English. Your site can reach the SMTP server, but the server is rejecting your login. That usually means the email or password is wrong, or your provider requires an app password or a different mailer. Below is a step by step path you can follow yourself or send to your host.

WP Mail SMTP shows:

There was a problem while sending the test email.
This means we were able to connect to your SMTP host, but were not able to proceed using the email/password in the settings.

How do I fix this?

Short version

This error is about authentication, not connection.

WP Mail SMTP reached your SMTP host. The server then refused to continue with the email and password you supplied.

Most of the time it is one of these:

  • The SMTP username or password is wrong.
  • The From Email does not match the authenticated account.
  • Your provider requires an app password, not your normal login.
  • SMTP login is disabled for that mailbox. Common with Microsoft 365 and some security setups.

We will first confirm your WP Mail SMTP settings. Then we will fix account details and app passwords. After that we will look at provider specific notes and error logs.


Quick path. Pick your situation

If you want to jump ahead:


What this error really means

The plugin message:

There was a problem while sending the test email.
This means we were able to connect to your SMTP host, but were not able to proceed using the email/password in the settings.

tells us two things.

  1. The network connection to the SMTP server worked.
  2. The server did not accept the credentials you provided.

In SMTP logs, that often shows as:

SMTP Error: Could not authenticate.
535 5.7.x Authentication unsuccessful

So we focus on who you are logging in as and what password or token you are using.


Step 1. Check WP Mail SMTP settings carefully

First, confirm you are using the correct mailer and basic settings.

  1. In wp admin go to WP Mail SMTP → Settings.
  2. In the General tab, scroll to the Mailer section.
  3. Make sure the mailer is what you intend. For this error text you are likely using Other SMTP.

If you are using Other SMTP:

  1. Confirm SMTP Host matches your provider exactly. For example:
    • smtp.gmail.com for Gmail.
    • smtp.office365.com for Microsoft 365.
    • Your host specific name for cPanel or similar.
  2. Confirm Encryption and SMTP Port match your provider guide.
    • Many providers use TLS on port 587.
    • Some use SSL on port 465.
  3. Confirm Authentication is set to On.
  4. Look at SMTP Username and SMTP Password and keep them in mind for the next steps.

If any value is wrong, fix it using your provider documentation. WP Mail SMTP has an Other SMTP guide that lists common hosts and ports.

Click Save Settings after changes, then go to WP Mail SMTP → Tools → Email Test and send a new test. If the error persists, move on.


Step 2. Make sure email, username, and password match

This error often appears when:

  • You enter one email in From Email.
  • But you log in as a different mailbox in SMTP Username.

Many SMTP providers expect these to match or at least be allowed as a send as address.

Check From Email

In WP Mail SMTP → Settings:

  1. Look at From Email.
  2. Set it to the same email address as the mailbox you use to authenticate. For example the same address as your SMTP Username.
  3. Check Force From Email so other plugins do not override it.
  4. Save settings.

Check SMTP Username and password

Still in the settings:

  • Make sure SMTP Username is exactly what your provider expects.
    • Usually this is the full email address, such as [email protected].
    • Some hosts use a shorter account name. Follow their guide.
  • Re enter your SMTP password to be sure there is no typo.

Do not copy and paste with extra spaces. If you are unsure, reset the mail account password in your email control panel, then paste the fresh value into WP Mail SMTP.

Save settings, then send another test email.

If the error remains and you use a large provider like Google, Microsoft, Yahoo, Zoho, or iCloud, you probably need an app password instead of your normal login.


Step 3. Use an app password where required

Many email providers do not allow your normal account password for SMTP logins from apps. They require a special password or token just for SMTP.

These include:

  • Gmail and Google Workspace.
  • Outlook, Hotmail, and Microsoft 365 mailboxes.
  • Yahoo Mail and Yahoo Business.
  • AOL.
  • Zoho.
  • Proton Mail.
  • iCloud Mail.

If you see a message like “This means we were able to connect to your SMTP host, but were not able to proceed using the email/password” and you are using one of these, it is very likely you are still using the normal account password.

Create an app password

The exact steps differ per provider. In general you:

  1. Log in to your email account in a browser.
  2. Open your Security or Account settings.
  3. Enable two factor authentication if needed.
  4. Find the App passwords section.
  5. Create a new app password named WP Mail SMTP.
  6. Copy the generated app password.

Then:

  1. Go to WP Mail SMTP → Settings.
  2. Paste this value into SMTP Password.
  3. Save settings, then send a new test.

The WP Mail SMTP docs have provider specific links inside the app password section. Those walk through Gmail, Outlook, Yahoo, Zoho, Proton, and others.

If you still see the error after switching to an app password, look at the provider specific notes next.


Step 4a. Gmail and Google Workspace notes

If your SMTP Host is smtp.gmail.com:

  • Use TLS and port 587 in most cases.
  • Set SMTP Username to your full Gmail or Workspace address.
  • Use a Gmail app password, not your regular login.

Follow the Gmail steps in the official WP Mail SMTP docs:
Gmail SMTP settings and app password.

Also:

  • Check your Google account security alerts. Google may block new SMTP logins until you confirm they are you.
  • Click the “Check Activity” link in any security email from Google and mark the login as allowed if it is your site.

If you keep hitting authentication errors with Gmail SMTP, consider switching to the Gmail mailer in WP Mail SMTP. That uses OAuth and avoids many SMTP login issues:
Gmail mailer setup.


Step 4b. Outlook and Microsoft 365 notes

If your SMTP Host is smtp.office365.com:

Recommended settings from the WP Mail SMTP guide:

  • Encryption TLS.
  • Port 587.
  • Authentication On.
  • Username full Outlook or Microsoft 365 email address.
  • Password an app password or token, not your normal password.

Important. Microsoft is retiring basic SMTP authentication for many tenants. If SMTP AUTH is disabled, you will see logs like:

535 5.7.139 Authentication unsuccessful, SmtpClientAuthentication is disabled for the Tenant

In that case you must:

  1. Ask your Microsoft 365 admin to enable SMTP AUTH for that mailbox, or
  2. Stop using Other SMTP and switch to the Outlook mailer in WP Mail SMTP, which uses modern authentication.

You can see the official notes here:
Outlook mailer setup guide.

If your business has SMTP AUTH disabled on purpose, you will need to use the Outlook mailer or another transactional provider instead of direct SMTP.


Step 4c. Other email hosts and cPanel mail

If you use a custom mail server or shared hosting mail:

  • Check your hosting welcome email or docs for the exact SMTP Host and port.
  • Make sure your mailbox is created and active.
  • Confirm whether the username is the full email address or a shorter account name.
  • Reset the mailbox password and update the same new password in WP Mail SMTP.

Many shared hosts give cPanel. In cPanel you can:

  1. Go to Email Accounts.
  2. Find the mailbox you use.
  3. Reset its password.
  4. View the configuration guide which lists correct SMTP host and port.

Copy exactly what they show into WP Mail SMTP. Then send a new test email.

If you still see authentication errors, check the detailed debug log.


Step 5. Check the full WP Mail SMTP error log

WP Mail SMTP can show a detailed log of what the server replied when login failed.

  1. In wp admin go to WP Mail SMTP → Tools → Email Test.
  2. Enter an address you control.
  3. Click Send Email.
  4. Wait for the test to complete.

If it fails, you should see a link or section for a full error log. Copy that text.

In the log, look for lines like:

SMTP Error: Could not authenticate.
535 5.7.8 Username and Password not accepted

or

Authentication unsuccessful, SmtpClientAuthentication is disabled

These messages come directly from your email provider. They tell you whether it is a plain wrong password, a blocked login, or a disabled SMTP feature.

If you open a ticket with your host or email provider, include this log. It speeds up their diagnosis.

You can also review the general troubleshooting guide from WP Mail SMTP here:
Troubleshooting WP Mail SMTP.


Step 6. What to ask your host or email provider

If you have checked settings and tried an app password but tests still fail, your provider needs to look at their side.

When you open a ticket, include:

  • The exact plugin message.There was a problem while sending the test email. This means we were able to connect to your SMTP host, but were not able to proceed using the email/password in the settings.
  • Your SMTP host, port, and encryption.
  • Your email address used as SMTP Username.
  • A copy of the latest WP Mail SMTP debug log for a failed test.

Then ask them to confirm:

  • That SMTP login is enabled for this mailbox.
  • That your username and password are valid for SMTP.
  • That there are no security rules blocking login from your server IP.
  • Whether you must use an app password or special token instead of your main password.

Often they will adjust a setting like SMTP AUTH or unblock your server, and the next test will work.


Verification checklist

You are in good shape when:

  • WP Mail SMTP test email sends without the authentication error.
  • Your contact form and WordPress notifications arrive in your inbox.
  • WP Mail SMTP logs no longer show “Could not authenticate” or similar messages.
  • You know exactly which email account and app password your site uses to send mail.

Still stuck?

For AI help

Hit Continue Chat below and tell me:

  • Which mailer you are using in WP Mail SMTP.
  • Your SMTP host and port.
  • Which email provider you use. For example Gmail, Microsoft 365, cPanel mail, Zoho.
  • The exact error lines from your latest WP Mail SMTP debug log.

I can help you turn that into clear next steps you can follow or send to your provider.

For expert human help

Scroll down to the contact form below. Enter your name, email, and WordPress needs. Atiba will get back to you as soon as possible.

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!