Fixing 'Incorrect Authentication Data' and Other SMTP Login Errors in WordPress
Content
Encountering authentication errors like "Incorrect authentication data" or "5.7.139 Authentication unsuccessful" is one of the most common issues when configuring the Post SMTP plugin. These errors can be frustrating, especially when you're certain your login credentials are correct.
Based on community support threads, these errors rarely indicate a bug in the plugin itself. Instead, they are almost always caused by a configuration issue elsewhere. This guide will walk you through the most effective troubleshooting steps to resolve these authentication failures.
Why Do These Authentication Errors Happen?
The error message is typically generated by your mail service provider (like Gmail, Office 365, or your hosting provider's SMTP server), not by the Post SMTP plugin. The provider is rejecting the connection attempt because something is wrong with the login request. The root cause can range from incorrect server settings and caching problems to special characters in passwords.
Step-by-Step Troubleshooting Guide
Follow these steps in order to diagnose and fix the problem.
1. Verify and Re-enter Your Credentials
This may seem obvious, but it's the most common fix. Double-check your username (usually your full email address) and password.
- Test your credentials elsewhere: Try logging into webmail or setting up the same account in a desktop email client like Outlook or Thunderbird. If it fails there too, the problem is with your mail service account, not the plugin.
- Recently changed your password? If you updated your email account password, you must also update it in the Post SMTP settings. The plugin will not automatically sync with this change.
2. Check for Problematic Characters in Your Password
Multiple users have reported that passwords containing certain special characters can cause authentication to fail, even if they work in other email clients.
- Problematic Characters: The percent sign
%and the less-than symbol<have been specifically identified as causing issues in some configurations. - Solution: Change your email account's password to one that uses only letters, numbers, and simpler symbols like
!,@, or$. Avoid%and<. After changing the password, update the credentials in Post SMTP.
3. Investigate Caching and Configuration Conflicts
If your username or password seems to be "stuck" and reverts to an old value no matter what you enter, a caching mechanism is likely at play.
- Object Caching: Many hosting providers use server-level object caching (like Redis or Memcached). Contact your host's support and ask them to flush or clear the object cache for your site.
- Constants in wp-config.php: The plugin will prioritize credentials defined in your website's
wp-config.phpfile over those set in the admin dashboard. Open the file and look for these lines. If they exist, either delete them or update the values:define('POST_SMTP_AUTH_USERNAME', '[email protected]'); define('POST_SMTP_AUTH_PASSWORD', 'old_password');
4. Review Your Mailer and Server Settings
Incorrect server details will prevent a successful connection.
- Use the correct mailer: Ensure you have selected the correct mailer type (e.g., Gmail, Office 365, Other SMTP) in the Post SMTP setup wizard.
- Confirm SMTP details: If using "Other SMTP," double-check the SMTP host, port, and encryption type (SSL/TLS/None) with your email service provider. These details are not always the same across different providers.
- Check hosting restrictions: Some hosts, especially those using cPanel, have security tweaks that block SMTP. Log into your hosting control panel and search for settings like "Restrict outgoing SMTP" or "SMTP Tweak" and ensure they are disabled. Also, check if an account-level firewall (like CageFS) or brute force protection (like cPHulk) is blocking the connection; you may need to whitelist your server's IP address.
5. Check DNS and SPF Records (For Domain Mail)
If you are sending from an email address on your own domain (e.g., [email protected]), an incorrect SPF record can cause authentication failures.
- An SPF record is a DNS entry that tells other mail servers which servers are authorized to send email for your domain.
- Use a online tool to check your domain's SPF record. For Office 365, a common valid record is:
v=spf1 include:spf.protection.outlook.com -all - Ensure your domain's SPF record includes the SMTP server you are using to send mail (e.g.,
include:spf.protection.outlook.comfor Office 365, or your server's IP address withip4:44.55.66.77).
6. Perform a Conflict Test
A theme or other plugin might be interfering with Post SMTP's configuration.
- Temporarily switch your theme to a default WordPress theme like Twenty Twenty-Four.
- Temporarily deactivate all other plugins except Post SMTP.
- Try to reconfigure the plugin. If it works, reactivate your plugins and theme one by one, testing after each, to find the culprit.
When to Seek Further Help
If you have worked through all these steps and the issue persists, your next step should be to contact your hosting provider or email service provider (like Microsoft or Google).
They can check their server logs for connection attempts from your website, which will often provide a more specific error message than what is shown in WordPress. When you contact them, provide the full error message and your website's IP address.
By methodically working through these common causes, you can identify and resolve the authentication error preventing your WordPress site from sending emails.
Related Support Threads Support
-
Trying to access array offset on value of type boolhttps://wordpress.org/support/topic/trying-to-access-array-offset-on-value-of-type-bool-28/
-
set uphttps://wordpress.org/support/topic/set-up-88/
-
Incorrect authentication datahttps://wordpress.org/support/topic/incorrect-authentication-data-15/
-
Email not validatinghttps://wordpress.org/support/topic/email-not-validating-2/
-
Authentication Error – Strange Solutionhttps://wordpress.org/support/topic/authentication-error-strange-solution/
-
Authentication Errorhttps://wordpress.org/support/topic/authentication-error-21/
-
Step 5 (authentication)https://wordpress.org/support/topic/step-5-authentication/
-
5.7.0 Invalid login or passwordhttps://wordpress.org/support/topic/5-7-0-invalid-login-or-password/
-
Authentication unsuccessfulhttps://wordpress.org/support/topic/authentication-unsuccessful-2/
-
Google authentication 403 errorhttps://wordpress.org/support/topic/google-authentication-403-error/
-
Incorrect authentication datahttps://wordpress.org/support/topic/incorrect-authentication-data-16/
-
What is fake_user[name] ?https://wordpress.org/support/topic/what-is-fake_username/
-
5.7.139 Authentication unsuccessfulhttps://wordpress.org/support/topic/5-7-139-authentication-unsuccessful-5/
-
Password not savedhttps://wordpress.org/support/topic/password-not-saved/
-
Authentication Error with special character in PWhttps://wordpress.org/support/topic/authentication-error-with-special-character-in-pw/
-
% Character in Password Causes Authentication Errorhttps://wordpress.org/support/topic/character-in-password-causes-authentication-error/
-
Incorrect authentication datahttps://wordpress.org/support/topic/incorrect-authentication-data-14/
-
special character less than not allowed and fails authentication if usedhttps://wordpress.org/support/topic/special-character-less-than-not-allowed-and-fails-authentication-if-used/
-
Incorrect authentication datahttps://wordpress.org/support/topic/incorrect-authentication-data-17/
-
5.7.3 Authentication unsuccessfulhttps://wordpress.org/support/topic/5-7-3-authentication-unsuccessful-5/
-
Username does not change no matter whathttps://wordpress.org/support/topic/username-does-not-change-no-matter-what/
-
Authentication failure : Passwords with % percent symbolhttps://wordpress.org/support/topic/authentication-failure-passwords-with-percent-symbol/
-
Authentification Unsuccessful: 5.7.139 the user credentials were incorrecthttps://wordpress.org/support/topic/authentification-unsuccessful-5-7-139-the-user-credentials-were-incorrect/
-
5.7.139 Authentication unsuccessful,https://wordpress.org/support/topic/5-7-139-authentication-unsuccessful-4/
-
Password encoding problemhttps://wordpress.org/support/topic/password-encoding-problem/
-
Unauthorized(invalid_client)https://wordpress.org/support/topic/unauthorizedinvalid_client/
-
5.7.0 From header syntax is invalidhttps://wordpress.org/support/topic/5-7-0-from-header-syntax-is-invalid/