If you are here, you might have faced a situation when WordPress did not send emails to your registered email address. As a webmaster, it can affect a lot of day-to-day activities on your site – you won’t get email notifications for comments and contact form submissions, you cannot add and verify a new email address nor can you get back into your site if you forgot your password.
Also, if you are adding new users to your site manually, they won’t be able to get the link to set a password for their account.
I have faced the exact situation and it can be extremely frustrating. To solve this issue, there is only one reliable solution – to use an SMTP (Simple Mail Transfer Protocol) server instead of the default WordPress mail function.
Using an SMTP server can solve all your issues related to email deliverability on your WordPress site. In this post, I will be showing you how to use the free WP Mail SMTP plugin by WPForms to configure your WordPress installation to use SMTP instead of the default PHP mailer function.
Problems with WP Mail function
By default, most WordPress hosting companies use PHP mail() function to send emails from your server. And even if there’s a minor problem with your server, it can severely affect your email deliverability. Sometimes, it can cause missing emails, land your transactional emails in the customer’s spam folder or even get your business email address blacklisted because of bad IP addresses.
Some web hosting companies also limit the number of emails that can be sent from their mail server. Some hosts go as far as disabling the entire mail function on your site and you are forced to look for alternatives.
It is always better to avoid using server-based email functionality and using SMTP instead.
How to fix email deliverability issues
You can fix the email deliverability issues on your site by using SMTP. Since SMTP requires proper verification and has secure authentication in place for identification and prevention of email spoofing, it is more reliable and trusted by businesses and email service providers like Gmail, Yahoo! and Outlook. SMTP also uses additional authentication mechanisms which ensure proper email delivery.
The major advantages of using an SMTP are –
- It is simple to configure
- It guarantees email delivery
- Is secure than traditional mail function
- Offers low latency and high throughput
- Offers end-to-end flow control, and more.
SMTP settings overview
There are a lot of SMTP plugins available for WordPress from the plugin repository, but my favorite is WP Mail SMTP – the best WordPress SMTP plugin. It is developed and marketed by the same team behind other popular WordPress plugins like WPForms, MonsterInsights, and OptinMonster.
Time needed: 15 minutes.
Let’s see how you can configure WordPress to use SMTP using the WP Mail SMTP plugin.
- WP Mail SMTP installation
Go to the ‘Add New’ plugins section on your WordPress dashboard and search for WP Mail SMTP. Once you have found the plugin, install it by clicking on the ‘Install Now’ button.
- WP Mail SMTP activation
Once the plugin is installed, activate it by clicking on the ‘Activate’ button.
- Basic SMTP settings
Now, navigate to the WP Mail SMTP settings page from your WordPress dashboard. If you take a quick look at it, you can find the basic configuration settings. This includes an option to change the sender email address, sender’s name and return path. You can change it to whatever you want but keep it meaningful.
NOTE: By default, the sender’s email address (From Email) will be your default WordPress admin email and the sender’s name (From Name) will be your site name.
- Advanced SMTP settings
Let’s move on to the advanced SMTP server configuration settings. As you can see from the below screenshot, your WordPress site will be using the default PHP mail() function to send emails. But now, you can configure it to use SMTP servers like Google/ G Suite, Mailgun, SendGrid, or any other email service provider.
If you are looking for the best SMTP server, I recommend you to go with Google, Mailgun, SendGrid or Zoho Mail. I personally use SendGrid. They all do a pretty neat job while sending emails and are also easy to use and configure.
- SMTP mailer selection
You can now select the SMTP mailer which you want to use on your site and follow the on-screen instructions to complete the configuration.
- Third-party SMTP server
If your SMTP mailer cannot be found in the list, you can select the ‘Other SMTP’ option to configure it manually.
Once you have followed the on-screen instructions and set up your WordPress site to use your desired SMTP server, you are all set to go. You have successfully finished the WP Mail SMTP configuration.
It’s time to test your emails! 😉
SMTP settings for popular email service providers
Since Mailgun and SendGrid are the two of the most commonly used email delivery platforms, I have covered them below to help you integrate it with the WP Mail SMTP plugin. I’ll add steps for other popular service providers when I get more time.
Mailgun WordPress SMTP integration
If your business needs you to send out a lot of emails constantly, you can use Mailgun. Mailgun is a popular email service provider which is based on the freemium pricing business model. With their free plan, you can send up to 10,000 emails per month and perform 100 validations. Validations help you verify if an email address really exists and keeps your business email address away from honeypots.
If you are a blogger, the basic Mailgun plan is more than enough. But if you are an established business with many customers and email followers, you should consider upgrading to one of their premium plans.
Step 1 – Sign up for a Mailgun plan using the above button.
Step 2 – Once you have signed up, verify your email address by clicking on the confirmation link sent to your inbox. Also, verify your mobile number to keep your account secure.
Step 3 – You will now be redirected to your Mailgun dashboard. From there, go to the Domains section.
Step 4 – Click on the Add New Domain button.
Step 5 – Now, add your domain name.
NOTE: It is recommended that you use a subdomain for sending emails instead of your primary domain name to safeguard your domain’s reputation. You can read more about it from Braze.
Step 6 – Once you have entered a subdomain, you need to verify your ownership of the domain name to prove Mailgun that you own the domain name or you are authorized to send emails on their behalf. You can find a list of popular domain registrars on their website. Choose your registrar from that list to get detailed instructions on how to do the same.
Step 7 – Add the DKIM and SPF TXT records to your DNS records manually. SPF (Sender Policy Framework) specifies which domains can send messages and DKIM (DomainKeys Identified Mail) verifies that message content is authentic and has not been tampered with. Essentially, it prevents the bad guys from using your email address for spamming and email spoofing.
Step 8 – Now, go to your Mailgun Security page.
Step 9 – Find your private API key and copy it.
Step 10 – Head over to the WP Mail SMTP plugin settings page, choose Mailgun as your Mailer and configure it with your API key and domain name. Don’t forget to save your settings.
Step 11 – To test if your SMTP settings are working properly, you need to send a test email. You can do this from your WP Mail SMTP dashboard itself.
Step 12 – If everything is working properly, a success message will be displayed.
If not, you can easily get help from the WP Mail SMTP support team by describing your issue on their support forum. Please remember to describe your problem in detail and include details about your server configuration, your mail service provider, and SMTP settings used so that they can help you better.
SendGrid WordPress SMTP integration
SendGrid is also a popular cloud-based email delivery platform and on their Free plan, you can send up to 40,000 emails in the first 30 days and then 100 emails per day, forever.
This is enough for bloggers who don’t have many email subscribers and businesses wishing to take SendGrid out for a spin.
Step 1 – Once you have created a SendGrid account, you will be welcomed with a setup wizard. Click on the Start button.
Step 2 – Select the SMTP Relay option under the setup method.
Step 3 – Name your API key and click on the Create Key button.
Step 4 – Once you have created your API key, copy it.
Step 5 – Head over to the WP Mail SMTP settings page, choose SendGrid as your Mailer and paste the API key. And, don’t forget to save your settings.
Step 6 – Go back to SendGrid’s API page, check the box as seen in the image below and click on the Next button.
Step 7 – Click on the Verify Integration button.
Step 8 – If everything goes fine, your SendGrid SMTP setup will be complete.
Step 9 – But for sending emails over time without getting marked as suspicious by email service providers like Gmail, Outlook, and Yahoo!, you need to authenticate your domain name with SendGrid. This is a one time process and it allows SendGrid to prove to email providers that it has permission to send emails on your behalf.
You can do this by going to Settings > Sender Authentication from your SendGrid dashboard and adding your domain name.
Step 10 – Now, you will be asked for some information about your domain registrar (GoDaddy, NameCheap, Domain.com, etc) and whether you want to set up link branding or not. I would recommend you to enable it to ensure better email deliverability.
Step 11 – Once you have filled in all the required details in the above step, you will be asked to add a few CNAME records to your list of existing DNS records. This is required to verify your ownership of the domain name.
Once you have added them to your DNS host, verify it from your SendGrid account to make that they are in place.
Step 12 – Send a test email to yourself to verify if the domain authentication is working properly and that there are no mentions of sent by [email protected] or ‘via sendgrid.net’ in the from email address.
WP Mail SMTP Pro Advantages
The free version of WP Mail SMTP is enough for most bloggers out there. But if you are a small and medium-sized business or an enterprise, you need the WP Mail SMTP Pro version.
You can manage notifications sent from your site, log all emails, and get priority support from a team of WP Mail SMTP Pro experts.
If this is not enough for you, they also offer a white-glove support service where they will do everything for you – installing the WP Mail SMTP Pro plugin, adding the DNS records, configuring your mail server, integrating it with WP Mail SMTP Pro, and testing email delivery.
Get WP Mail SMTP Pro
So, what are you waiting for? Get the WP Mail SMTP Pro plugin right away. Oh, and it comes with a 14-days money-back guarantee. If you are not happy with their product, you can always get a refund.
But I don’t think that will be the case since they offer the best support and with their white-glove service, you can just sit back and relax. Their experienced support team will take care of everything on your site.
I hope you found this post helpful and enjoyed the read. If you did, please consider sharing this post with your friends, businesses, and fellow bloggers on social media so that they can also discover this useful solution to all their email deliverability headaches.