How To Setup SMTP For WordPress Email Delivery

Is your contact form e-mails not coming to your e-mail inbox? Keep reading to learn how to correctly setup SMTP for WordPress email delivery.

By Claudio Pires
Updated on January 1, 2024
How To Setup SMTP For WordPress Email Delivery

Is your contact form e-mails not coming to your e-mail inbox? See a simple way to fix it and make the e-mails come appropriately. In this post, I’ll show you how to increase the deliverability of emails sent by WordPress using SMTP. Keep reading to learn how to correctly setup SMTP for WordPress email delivery.

Do you know what sucks? When your emails show up in your intended recipients’ spam folders. You’re sending content that needs to be seen, but the Internet gatekeepers send it straight to junk.

It’s annoying. But as anyone who has tried to receive Contact Form 7 emails at their Gmail account can attest to, it happens far too often with emails sent to your WordPress site.

See, that’s because WordPress, by default, uses the PHP mail function. And as a result, spam folders can eat far too many essential emails like contact form notifications, registration details, password resets, and more.

How To Setup SMTP For WordPress Email Delivery
How To Setup SMTP For WordPress Email Delivery

What’s the Problem With WordPress’ PHP Mail Function?

If you’re lucky, nothing. PHP mail works most of the time. In my experience, it’s rare for essential WordPress notification emails to go to spam (though it does happen), where WordPress’ PHP mail function can break down when sending notifications from plugins.

For example, I consistently have to set up custom filters to allow notification emails from my contact form plugin to go to my inbox instead of my spam folder.

Some hosts also limit the use of the PHP mail function. As far as I know, this isn’t a significant consideration (most hosts will only determine you if you’re abusing it), but it may be a problem for some hosts.

Additionally, I’ve read about some security plugins causing issues with WordPress’ PHP mail function, though I haven’t personally experienced this.

If you’ve been having any deliverability problems with your WordPress emails, moving to SMTP offers a good chance of fixing them.

What’s the Problem With WordPress’ PHP Mail Function?

What is SMTP? Why Use it for WordPress

Short for Simple Mail Transfer Protocol, SMTP is a well-established standard for transmitting emails. The main benefit you’ll see is better deliverability and reliability. Email clients like Gmail and others are less likely to view emails sent via SMTP as spam. That’s because, unlike PHP mail, emails sent via SMTP undergo some authentication. You’ll also be able to set up a branded email for outgoing WordPress emails.

How to Send WordPress Emails via SMTP

For a long time, the standard plugin to set up SMTP for WordPress was the well-named WP Mail SMTP. As far as I know, that’s still a viable option. But it’s not what I recommend you use. Instead, I recommend a plugin called Postman SMTP. Here’s why:

  • Postman SMTP includes a straightforward setup wizard
  • You don’t need to store your email account password details in plaintext (big no-no)
  • It replaces PHPMailer with Zend_Mail
  • It logs all emails and sends errors so that you can easily spot any problems
  • Postman SMTP delivers via HTTPS if your host blocks SMTP ports

It’s an all-around better experience than WP Mail SMTP. Here’s how to use it.

How To Setup SMTP For WordPress Email Delivery
How To Setup WordPress Email Delivery

Step 1: Install and Activate Postman SMTP

Get started by installing and activating the plugin. It’s free at the directory so you can install it directly from your WordPress dashboard.

Once it’s activated, get ready to configure it by heading to Settings → Postman SMTP.

Step 2: Configure Details To Setup SMTP For WordPress Email Delivery

A nice thing about Postman SMTP is its handy setup wizard. All you need to do to launch the wizard is click the button. Easy enough, right?

I’ll show you how to set everything up using your host’s SMTP information. But you can also use a third-party SMTP service like Gmail or SendGrid if that’s more your speed.

The first thing you need to do is enter the email you want to send emails from and the default “From” name:

Next, you’ll need to add your outgoing hostname:

To find your outgoing hostname, you need to go to your cPanel account at your host. Under your Email Accounts. Find the email you want to use, and choose Set Up Mail Client. If you haven’t already created an email account, you can do that from the same page in cPanel:

Then, scroll down to Manual Settings and find the Secure SSL/TLS Settings. Your outgoing hostname is the URL by the Outgoing Server option:

Once you enter your outgoing hostname, Postman will analyze it and (hopefully) give you a list of options to choose from:

Make sure you choose the outgoing hostname with the correct port number. You can get the port number from the exact location in your cPanel account.

You’ll need to enter your username and password on the next page. Again, you can find these in the exact location in your cPanel. Your username is typically your email address. And your password is the password you created for your email account in cPanel.

Once you enter those details, you’re finished!

Step 3: Send a Test Email To Setup SMTP For WordPress Email Delivery

Now’s a good time actually to make sure the setup worked adequately. To do that, you can send a test email from the Postman SMTP dashboard:

If everything went well, you should receive an email at the email address you entered. As long as you get the email, SMTP is properly configured!

Bonus – that smiling cartoon will surely put a smile on your face!

Using It With a Third-Party Email Service

As I said, you can also use Postman SMTP with a third-party email service. Gmail is one popular option. You can use it to send up to ~500 emails daily – you’ll just need to generate an API key to make it work.

You can also use SendGrid, which starts at $9.95 per month.

The Postman SMTP Set up Wizard will help you set up both options if you need assistance.

Don’t Use This for Newsletters

How To Setup SMTP For WordPress Email Delivery
How To Setup SMTP For WordPress Email Delivery

While SMTP is good for improving the deliverability of your essential WordPress emails, you should not use it for newsletters. If you want to build a newsletter, you should still get a list-building plugin and use something like MailChimp to send out your newsletters.

Another good option for newsletters is SendinBlue. It can integrate with your WordPress dashboard to help you safely send newsletters.

Wrapping Things Up

If you’re the sole user of your WordPress site and you’ve never experienced any issues with emails, you can probably just leave things as they are. But suppose you’ve ever had problems with WordPress emails going to spam. In that case, you should follow this guide to set up SMTP for WordPress and increase the deliverability and reliability of your transactional WordPress emails.

Claudio Pires

Claudio Pires is the co-founder of Visualmodo, a renowned company in web development and design. With over 15 years of experience, Claudio has honed his skills in content creation, web development support, and senior web designer. A trilingual expert fluent in English, Portuguese, and Spanish, he brings a global perspective to his work. Beyond his professional endeavors, Claudio is an active YouTuber, sharing his insights and expertise with a broader audience. Based in Brazil, Claudio continues to push the boundaries of web design and digital content, making him a pivotal figure in the industry.