In this document:
- Why Aren’t Emails Getting Delivered?
- How to Fix Email Delivery Issues
- SMTP Settings Overview
- Frequently Asked Questions and Common Issues
- My SMTP test email delivers successfully, so why aren’t my form notification emails delivering?
- My site’s hosting provider is GoDaddy and I can’t get SMTP to work. What can I do?
- Error: Could Not Open Socket
- Error: smtp connect() failed
- Error: Connection Refused
- Error: Mod_Security
- Error: 535 Incorrect authentication data
Have you set up Simply Schedule Appointments on your WordPress site, only to find that the emails aren’t getting delivered? It’s common to see email delivery issues in WordPress, but this can be fixed by using WP Mail SMTP by WP Forms for reliable, authenticated email delivery.
In this tutorial, we’ll show you how to use WP Mail SMTP to fix email delivery issues on your WordPress site.
Why Aren’t Emails Getting Delivered?
There are two main reasons that WordPress emails don’t deliver successfully: server configuration and spam filtering.
WordPress, and WordPress plugins, will send email using the PHP
mail() function by default. This is a simple way of sending email, and many WordPress hosting servers are not configured to use this
In addition, your email provider checks all incoming email to determine if it should be allowed to deliver, sent to spam, or blocked entirely. One way it will do this is by checking if the email is originating from the same location it claims to be sent from.
For example, if your email server is gmail.com but your email claims to be sent from your website’s domain, your form notification may be blocked before it even reaches the spam folder.
How to Fix Email Delivery Issues
SMTP (Simple Mail Transfer Protocol) will fix email delivery issues by changing the way your emails are sent and properly authenticating them. SMTP is the industry standard for ensuring email deliverability, and WP Mail SMTP is the most flexible way to connect to many different SMTP services.
Below is a list of all of the ways you can use WP Mail SMTP to set up SMTP on your site, along with links to tutorials on each:
- Gmail or G Suite: Works only with Google emails, more secure, no subscription
- Mailgun: Works with any email, more secure, requires subscription
- SendGrid: Works with any email, more secure, requires subscription
- Other SMTP: Works with any email, less secure, no subscription
SMTP Settings Overview
SMTP must be able to connect to your email provider, which is why it requires additional setup through a plugin like WP Mail SMTP.
Unlike the other options which use APIs to allow this setup information to be stored with Google, SendGrid, or Mailgun, the Other SMTP option in WP Mail SMTP requires this setup information to be stored directly on your site.
Below, we’ll go into more detail on each of the fields required to set up an “Other SMTP” option in WP Mail SMTP.
Other SMTP: Fields Needed When Using Less Secure, Traditional SMTP
- SMTP Host
- This is the the address to the host’s SMTP server
- SMTP Port
- The most common ports are 587 and 465, however hosts can and do change these. It’s not uncommon for web hosts to block these ports, so before you begin it’s always good to verify with your web host that the required port is open. If closed, most of the time your hosting provider can open it for you.
- SSL and TLS are the most widely used encryptions. If your email provider offers both, we recommend TLS. It is worth noting that usually TLS encryption is used with port 587, while SSL is used with port 465.
- Modern email providers require authentication. Disabling it may be needed for local development or other edge case scenarios, however most providers need this turned on.
- SMTP Username
- Your username is typically your email address for the email provider; e.g. firstname.lastname@example.org or email@example.com. Some providers such as AOL require the non-email format; e.g. if your email is firstname.lastname@example.org your username would be john_doe.
- SMTP Password
- This is your email account password. Please note although the password is not viewable in the settings, it is still stored in the database as plain text. This is required since establishing the SMTP connection requires sending the password in plaintext.
With this in mind, it’s highly recommended that you set up your password in your WordPress configuration file,
wp-config.php for improved security. For extra instructions, check out WPBeginner’s tutorial on how to edit the config file.
Here’s the code you’ll need to add:
define( 'WPMS_ON', true ); define( 'WPMS_SMTP_PASS', 'your_password' );
Then, you’ll just need to replace
your_password with your actual password. When you save the file and refresh your SMTP settings page, you should see the Password field is now slightly greyed out and disabled since it’s no longer being used.
SMTP Settings for Popular Providers
When filling out the fields mentioned above, the settings you’ll need will depend on your email provider.
Here are the SMTP settings you’ll need for the most popular email providers:
Gmail / G Suite SMTP Settings
- 587 (or 465 using SSL encryption)
- Your Gmail account email address (e.g. email@example.com)
- Your Gmail account password
Outlook.com SMTP Settings
- Your Outlook.com account email (e.g. firstname.lastname@example.org)
- Your Outlook.com account password
Office 365 SMTP Settings
- Your Office 365 account email
- Your Office 365 account password
Hotmail SMTP Settings
- Your Hotmail account email (e.g. email@example.com)
- Your Hotmail account password
Yahoo Mail SMTP Settings
- Your Yahoo Mail account email (e.g. firstname.lastname@example.org)
- Your Yahoo Mail account password
[Please note you will need to enable less secure apps.]
AOL SMTP Settings
- Your AOL screen name (e.g. john)
- Your AOL account password
That’s it! By using WP Mail SMTP, you’ll be able to get your site’s email delivering successfully.
Still seeing issues when you try to connect with SMTP? Be sure to check out the section below for the most common questions and issues.
Frequently Asked Questions and Common Issues
My SMTP test email delivers successfully, so why aren’t my form notification emails delivering?
If your test email is successful, this means that the SMTP is all set. Instead, you’ll need to check the form’s notification settings by opening the form builder and going to Settings » Notifications. From here you can check all settings, but specifically note the From Email (remember, this must match the email used to set up the SMTP).
My site’s hosting provider is GoDaddy and I can’t get SMTP to work. What can I do?
In many cases, GoDaddy will by default block the ports required for SMTP. To address this, you’ll need to reach out to GoDaddy’s support to ask them to open up the port you need for your site.
Error: Could Not Open Socket
This usually happens when your web host is blocking the ports required to connect. Often times this is due to a firewall that is running. Contact your host and ask them to open the port being used. Also, double check the port and encryption settings, as accidentally using SSL over port 587 can trigger this error.
Error: smtp connect() failed
The connection to the SMTP host failed. Typically this error is returned when the SMTP settings are incorrect or the SMTP host is denying/blocking the connection for security purposes. Some hosting providers, such as GoDaddy, may specifically be blocking the port needed for SMTP.
Be sure to double check all of your settings, including your email and password. If the error persists, the best next step is to contact your site’s hosting provider to ask them to check for any server issues.
Error: Connection Refused
A firewall may be preventing the connection. Contact your web host and ask them to open the port being used.
“Not Acceptable! An appropriate representation of the requested resource could not be found on this server. This error was generated by Mod_Security.”
This error most commonly occurs when the server is blocking requests needed to run SMTP. To fix, you’ll need to contact your site’s hosting provider and ask them to disable specific rules within Mod_Security, which they would determine using server logs.
Error: 535 Incorrect authentication data
“SMTP ERROR: Password command failed: 535 Incorrect authentication data”
This error generally results from overly strict server permissions, which your hosting provider should be able to help resolve. For WHM/cPanel server management, you can specifically ask your site’s hosting provider to switch the “Restrict outgoing SMTP to root, exim, and mailman” setting from “On” to “Off”.