WPLift is supported by its audience. When you purchase through links on our site, we may earn an affiliate commission.

WordPress SMTP Tutorial: How to Configure WordPress to Use SMTP Server

Last Updated on November 13th, 2020

Tags: , ,

Having trouble with WordPress emails not sending or ending up in recipients’ spam folders? Setting up a WordPress SMTP server might be just the ticket.

The default way that WordPress sends emails (via wp_mail) just isn’t that reliable because it’s not designed for reliable emailing. SMTP, short for Simple Mail Transfer Protocol, is designed exclusively for email, which is why it’s the solution to your WordPress site’s email woes.

In this post, I’ll share a little bit more about what SMTP is and why it’s so useful for WordPress users. Then, I’ll show you how to configure your WordPress site to send its emails via SMTP instead of the default WordPress email function.

Why Set Up a WordPress SMTP Server?

By default, WordPress sends its emails using the wp_mail function. This function is nice because it’s super simple. You don’t need to configure anything – your site can start sending emails right away as soon as you install WordPress.

However, the problem is that your WordPress site’s server isn’t really configured to send emails and this method also lacks authentication. When you put those issues together, you end up with a lot of your site’s emails ending up in users’ spam folders.

For example, it’s pretty common for notification emails from a form plugin to end up in spam, as I’ve personally experienced plenty of times back in my “WordPress newbie” days.

So if the problem with WordPress’ built-in email sending tool is that it’s not really designed for emails, the solution is to find something that is specifically designed for sending emails. That “something” is SMTP.

An SMTP server is a web server that’s specifically designed to reliably send emails. Using a WordPress SMTP plugin, you can configure your WordPress site to send all of its emails via the dedicated SMTP server, which will make your emails a lot more reliable.

Once you set up an SMTP server for WordPress, your site’s emails should be able to avoid the spam folder every time.

Better yet, as long as your site doesn’t send more than a few hundred emails per day, you should be able to find a free SMTP server that can get the job done. Speaking of…

Article Continues Below

Best Free WordPress SMTP Services

There are a variety of different SMTP services that you can use. Here are some of the best options that offer a forever free plan:

  • SendGrid – forever free plan for up to 100 emails per day.
  • Sendinblue – forever free plan for up to 300 emails per day (also lets you send marketing emails – learn more in our Sendinblue review).
  • Pepipost – forever free plan for up to 100 emails per day.
  • Elastic Email – forever free plan for up to 100 emails per day.
  • Mailjet – forever free plan for up to 200 emails per day.

And here are some good options that, while not offering a forever free plan, are still pretty dang affordable:

  • Amazon SES (Simple Email Service) – very affordable pay-as-you-go pricing for just $0.10 per 1,000 emails.
  • Mailgun – three-month free trial and affordable pricing after that.

Finally, some WordPress hosts also offer their own SMTP servers that you can use for your WordPress site. This is an option…however, it’s not an option that I recommend. I don’t find these servers to be as reliable and they usually don’t offer API access like a dedicated SMTP service.

Since you can find so many solid free SMTP services, I recommend just using a dedicated service instead of your host’s SMTP server.

How to Configure WordPress SMTP Server Using SendGrid

Again, while there are different free SMTP services, I’m going to choose SendGrid for this tutorial because:

  1. It’s free forever for up to 100 emails per day, which should work for most WordPress sites.
  2. It offers an API that gives you a simpler way to send emails instead of needing to enter standalone SMTP server credentials.
  3. I’ve been using it on my own sites for a while and have had a great experience.

The basic process goes like this:

  1. Register for a free SendGrid account.
  2. Access your SendGrid API key.
  3. Use a WordPress SMTP plugin to configure your site to send its emails using the SendGrid SMTP API.

Let’s go through it in more detail…

1. Register for a SendGrid Account

To get started, go to SendGrid and register for a free account.

2. Create SendGrid API Key

Once you’ve activated your SendGrid account, you need to create an API key. The API key is what you’ll use to connect your WordPress site to SendGrid. It’s also more secure/reliable than entering SMTP credentials directly (e.g. a server, username, password, etc.).

To create your API key, click this link or go to Settings → API Keys in your SendGrid dashboard. Then, click the Create API Key button:

Article Continues Below

SendGrid API keys

Next up:

  • Give it a name – you’re the only one who will see the name, so this just helps you remember it.
  • Choose Full Access.
  • Click Create & View.

Create SendGrid API key

Then, you should see your API key – keep this screen open because you’ll need it in the next step and SendGrid will only show you your API once. If you accidentally close it, don’t worry! You can just create another API key.


3. Install Post SMTP Mailer/Email Log Plugin

Next, you need to install the free Post SMTP Mailer/Email Log plugin on your WordPress site. There are lots of different WordPress SMTP plugins, but I like this one for several reasons:

  • It’s 100% free.
  • It lets you connect to the SendGrid API and has a ton of other services.
  • You can view a log of the emails that your site sends, which helps you make sure everything is working.
  • It lets you set a fallback SMTP server so that you can still deliver emails even if SendGrid fails for some reason.
  • It’s a fork of the previously-popular Postman SMTP plugin. This plugin was very popular until the developer stopped supporting it.

So yeah – I like it, and I’m not alone – it has a 4.9-star rating on over 230 reviews at WordPress.org.

4. Configure Post SMTP Mailer/Email Log

Once you’ve installed and activated the plugin on your site, go to the new Post SMTP tab in your WordPress dashboard and click the Show All Settings link under the wizard button:

Configure WordPress SMTP plugin

On the next screen:

Article Continues Below

  1. Choose SendGrid API in the Type drop-down.
  2. Leave the Mailer Type as PostSMTP.
  3. Paste your SendGrid API key into the API Key box (from Step #2).
  4. Click Save Changes.

Add SendGrid API key

Then, open the area of the full settings again and go to the Message tab. There, enter the From Address and Name that you want to use. When people receive an email from your site, they’ll see this information:

Then, save your changes.

5. Send a Test Email

To make sure that everything is working, the plugin lets you send a test email:

  • Go to the main Post SMTP tab.
  • Click the Send a test email option under the Actions column.

Then, enter the email address that you want to send your test email to:

You should see a success message:

And then when you go to your email account, you should also see a test message:

Test emails

You can also see a log of all the emails that your site sends by going to Post SMTP → Email Log. Again, this helps you diagnose any potential problems with undelivered emails:

Email log

Start Using a WordPress SMTP Server Today

Even for a simple WordPress site, your site will send a lot of transactional emails for things like password resets and form submission notifications. By default, you might experience poor reliability for these types of emails.

The fix is to use a dedicated WordPress SMTP server. In this post, I’ve shown you how to do just that using a 100% free solution. Implement it today and enjoy much more reliable emails.

Do you still have any questions about setting up WordPress with an SMTP server? Ask in the comments!

Would you like to learn more about WordPress?

Sign up for our Weekly WordPress Newsletter.

Every Friday you’ll receive news, tutorials, reviews, and great deals from the WordPress space.

Invalid email address
Colin Newcomer is a freelance writer and long-time Internet marketer. He specializes in digital marketing, WordPress and B2B writing. He lives a life of danger, riding a scooter through the chaos of Hanoi. You can also follow his travel blog.