If you have a WordPress website, then you can do a lot with its built-in functionality — including sending emails.
But this default functionality has limitations. To ensure that all of your emails arrive in your customers’ inboxes, then you need to use WordPress Simple Mail Transfer Protocol (SMTP) and configure your settings correctly. The easiest way to do that is by using a WordPress plugin like WP Mail SMTP.
In this article, we’ll explain everything you need to know about SMTP for WordPress, including:
- why WordPress’s default email functionality sometimes doesn’t work
- what SMTP is
- the best SMTP plugins for WordPress
- the best SMTP service providers for sending transactional emails
- how to set up WP Mail SMTP
The Problem With WordPress Default Email Settings
WordPress is built using PHP, which is a coding language that’s typically used for web development. WordPress’s content management system (CMS) uses this programming language for most of its core functionality, including sending emails.
You can send emails using a custom address with your website’s domain name. Not only does this help you engage with customers via email, but it also lets you do so while staying on-brand by sending messages from www.yourdomain.com — rather than a personal inbox.
However, sometimes WordPress’s email feature isn’t the most effective due to the way that it’s coded. If you stick to the default PHP mail function, some of your emails might never make it to their destinations due to how certain servers are configured.
For WordPress Admins
Some hosting providers disable the PHP email function altogether so customers can’t abuse their services and send spam emails. However, that leaves you in a bind. If your WordPress site can’t use the PHP mail function, you and your users will miss out on critical communications, such as:
- Signup or email change confirmations
- Lost password emails
- Purchase confirmation messages
- Email notifications from plugins
- Update notification emails
Although you can use WordPress without sending or receiving these messages, it can create headaches for your team in the long term. For example, if you lose your password, you won’t be able to use WordPress’s default account recovery process. You’d have to change it manually through your database.
Email becomes particularly critical if you’re encouraging customers to register an account on your website or make a purchase in your online store. For ecommerce shops, not being able to send transactional emails is a quick way to lose customer trust.
Another example is if you’re using forms to collect leads. If your form isn’t sending emails, users won’t get a submission confirmation and they might not think your form is working.
Some web hosts do support PHP email. However, your best bet is to use a more secure method to ensure your messages are delivered. That’s where SMTP comes into play.
What is Simple Mail Transfer Protocol (SMTP)?
Usually, servers fulfill very specific purposes that they’re configured for. That’s why some web hosting servers don’t support email at all.
Instead, web hosts and other service providers sometimes offer SMTP servers, which are configured to deal with emails. The work of an SMTP server includes:
- Sending and receiving emails
- Relaying outgoing mail
- Ensuring a high email delivery rate
Although you can use most email services for free, if you want to send transactional messages from a website you might need to pay for a premium plan. For example, if you send transactional messages in mass from a regular Gmail address, many email service providers will brand those messages as spam. To avoid that, you’d need to use something like a Google Workspace account, which offers an SMTP service that can handle transactional emails.
The takeaway here is that you can’t just connect any email to your website if you want to ensure deliverability. By using a WordPress SMTP plugin, you can make sure your emails reach their destination by connecting a server that’s designed to handle all types of emails.
Let’s review some of the best SMTP WordPress plugins in the section below.
Best SMTP Plugins for WordPress
A WordPress SMTP plugin helps you integrate your website with an SMTP server to relay and send emails. Most of these plugins offer one or two integration options and they support a broad variety of email service providers.
Choosing the best WordPress SMTP plugin will come down to which one supports the email provider for your SMTP server. As far as configuration goes, most of these plugins are relatively easy to set up, which we’ll demonstrate later in this post.
For now, let’s look at the top SMTP plugins for WordPress.
1. WP Mail SMTP
What we like: The free version of WP Mail SMTP offers eight built-in SMTP mail provider integrations.
Used on over two million sites, WP Mail SMTP is the most popular free SMTP plugin for WordPress. That popularity is largely due to its ease of use and fast setup.
To make it easy to configure your settings, WP Mail SMTP has a setup wizard that walks you through every step of linking your SMTP provider with WordPress. You can use either OAuth2 (available for Gmail accounts) or another built-in SMTP mail provider integration, or enter your SMTP server information and credentials manually.
The free version of WP Mail SMTP supports the following email marketing services and SMTP providers:
If you upgrade to the premium version of WP Mail SMTP, you’ll gain support for additional platforms including Amazon SES, Microsoft Outlook.com and Office 365, Zoho Mail, and more.
Even if your SMTP provider doesn’t appear in the list above, this WordPress email plugin will help you link it with your website. All you have to do is enter its server details and your credentials manually. However, connecting any of the services that the plugin supports out of the box is much simpler.
2. Post SMTP
What we like: Post SMTP offers advanced features like email logs and fallback mailing to improve the delivery of your emails.
Post SMTP is a powerful WordPress email plugin that includes a number of advanced SMTP settings. At its core, it enables you to connect your website with your SMTP provider using OAuth2 or its API.
The free version of this plugin supports the following providers:
- Gmail or Google Workspace
- MailChimp Transactional Email
Upgrading to the premium version will provide support for three additional platforms: Amazon SES, Office 365, and Better Email Logger.
Unlike other WordPress plugins, Post SMTP doesn’t enable manual SMTP server configuration for security purposes. That means if you’re not using one of the following providers above, this might not be the best solution for you. But if you are using one of the supported providers, you can leverage its advanced functionality.
Post SMTP’s support for API integration means that this plugin works even if your web host blocks standard SMTP ports (which happens with some shared hosting providers). On top of that, this plugin includes a diagnostics tool to help you troubleshoot problems with SMTP integration.
Finally, Post SMTP enables you to keep logs of the emails that you send, and you can use it to configure a fallback SMTP service in case your first option fails to deliver your emails.
3. SMTP Mailer
What we like: SMTP Mailer is designed to work with any email service provider that enables you to connect to its SMTP servers.
Unlike the other plugins in this roundup, SMTP Mailer doesn’t include built-in support for any specific SMTP provider. Instead, the plugin enables you to connect your SMTP service with WordPress by entering its settings and your account credentials.
With SMTP Mailer, you can configure which SMTP port and what type of encryption to use for your emails. The plugin also enables you to send test emails to check if your WordPress SMTP settings are correct.
Technically, SMTP Mailer should work with any email service provider that enables you to connect to its SMTP servers. As far as WordPress integrations go, this plugin has been tested with several contact form tools, including:
- Contact Form 7
- Formidable Form Builder
If you’re looking for a WordPress SMTP plugin that works with most contact form builders, SMTP Mailer can be a fantastic option.
What we like: FluentSMTP lets you connect multiple email service providers, including Amazon SES, for free.
FluentSMTP is a powerful and flexible SMTP plugin that lets you connect multiple email service providers and automatically routes your emails to the appropriate provider based on the "from" email address.
This free plugin offers native integrations with the following:
- Amazon SES
- Google Workspace
- Zoho via
You can also connect other SMTP providers like Yahoo and Zoho manually.
FluentSMTP also offers email logs and reporting so you can keep track of how many emails you're sending and how they're performing. Having access to an email log is helpful if you want to store emails for your records, audit outgoing emails, or debug during site development.
What we like: Sendinblue's free plugin enables you to quickly and easily connect your Sendinblue account to your WordPress website.
Unlike the plugins above, Sendinblue is a dedicated plugin. Meaning, it only supports an integration with the Sendinblue email service provider. While this may be too limiting for some WordPress users, it's an ideal choice for users who want to integrate with Sendinblue only.
In addition to enabling you to send transactional emails via Sendinblue’s SMTP, this free plugin lets you create transactional email templates via the API and track email metrics like the number of emails delivered, opened, and clicked in real time.
With Sendinblue’s plugin, you can also create and embed custom subscription forms on your site, manage and segment your contact lists, and use a drag and drop builder to create custom emails.
The SMTP plugins above should work for almost any SMTP service that you’re using for your website. However, before you can start configuring your WordPress SMTP plugin and settings, you also need to choose an email service provider.
We’ve listed a few in the section below.
SMTP Email Service Providers for WordPress
As we mentioned before, you don’t want to use a personal account to send transactional emails. You need either a professional email service that offers access to an SMTP server or a dedicated email marketing provider.
Google Workspace, for example, falls within the former category. It’s designed to deliver professional emails, but you can also set it up to work as a relay service for your transactional messages with a Gmail SMTP WordPress integration.
However, in our experience, you’re better off using an email marketing service that offers SMTP functionality. Some example of these platforms include:
Aside from the CRM and various free marketing, sales, and customer service tools, you can use HubSpot’s transactional email API to send WordPress emails. Transactional emails are available as an add-on to HubSpot’s email marketing plans.
The free SendInBlue plan supports up to 300 emails per day. If you’re looking to send more, you can upgrade to a premium plan that has no limitations and it offers additional features like A/B testing so you can optimize the reach and engagement of your email campaigns.
With Mailgun, you can pay by email volume or sign up for a monthly plan. If you pay by volume, every 1,000 emails cost approximately $0.80. This is a good option if you don’t frequently conduct email marketing campaigns.
The free SendGrid plan enables you to send up to 100 emails per day and provides you API and SMTP relay access. A premium plan ungates features like optimization tools and analytics, so you can consistently create emails that your subscribers love to engage with.
Mailtrap is an Email Delivery Platform for businesses and individuals to test, send and control their email infrastructure in one place. It gives users the upper hand to streamline email delivery in WordPress while protecting their sender and domain reputations. The free plan allows sending up to 1000 emails monthly, while four paid plans offer various sending capacities. All platform customers can rely on fast and quality support from deliverability experts.
This Mailchimp add-on — formerly known as Mandrill — charges you approximately $20 per every 25,000 emails on top of your regular Mailchimp plan. It’s designed to help you send personalized transactional emails using an API or SMTP.
If you’re only worried about transactional emails, there are a few providers that offer generous free plans. In most cases, you probably won’t reach a limit of 100-300 emails per day unless you have a website with a sizable user base. If that’s the case, then you definitely want to invest in a premium email service plan.
Before we wrap up, let’s show you how to install an SMTP plugin on your WordPress site.
How to Set Up WP Mail SMTP
There are three ways to set up the WP Mail SMTP plugin for WordPress. You can connect to Gmail via OAuth. You can connect to another recommended mailer like SendGrid via its API. Or you can manually connect other SMTP services that aren't supported by the plugin out of the box.
We chose the WP Mail SMTP plugin for this demo because it supports OAuth, API configurations, and manual SMTP so we can show you all three approaches below.
Every SMTP plugin uses at least one of these methods for connecting your email service provider with WordPress, so if you know how to use WP Mail SMTP, you should be able to use any of the other plugins as well.
Option 1: Set up a Gmail Web App for OAuth integration.
Once you've installed and activated WP Mail SMTP, the plugin will automatically launch its configuration wizard, which provides a quick way to customize your WordPress SMTP settings.
- To start, select the Gmail option.
- On the next screen, WP Mail SMTP will ask you for your client ID, secret key, and authorized redirect URL:
Note: To get these details, you’ll need to set up a new web app within your Gmail or Google Workspace email account. That means you’re going to use the Gmail API by filling out information about what your web app will do. You can find a full guide on how to set up a web app within Gmail for connecting it to WP Mail SMTP within the plugin’s documentation.
- Once you fill out the required fields, you can click on Connect to Google at the bottom of the page.
- An authorization window will then appear asking you to log in using your Google email address.
- Once you do, you can select whether to allow or deny the WP Mail SMTP plugin access to your Google Account.
After allowing the plugin access to your Google account, it’ll be able to use it as an SMTP relay to send emails from your website.
Altogether, the OAuth approach is relatively simple, but it can take a while to set up the web apps needed for it to work.
To watch every step of the process of setting up WP Mail SMTP with Gmail, check out the following video by Smart Help Guides:
Option 2: Connect to your SMTP provider via its API.
Technically, we used the Gmail API during the last method to connect our email service provider to WordPress. However, if you’re using a dedicated email marketing service or SMTP provider, you won’t need to set up a web app to connect WP Mail SMTP to its API.
For example, if you select the SendGrid option from the WP Mail SMTP configuration wizard, the plugin will ask you for an API key, sending domain, and sender address to establish the connection between the platform and your site.
So, to use this method, you’ll need to have an account set up with your email service provider and create your sender address (the address that your transactional messages will come from) before you can establish the necessary connection. In fact, creating your sender identity is the first thing that SendGrid asks you to do when you sign up for an account.
Many companies set up their sender addresses as ‘noreply’ emails, such as firstname.lastname@example.org.
The goal of this type of address is to discourage recipients from answering your emails since the inbox associated with the sender address goes unmonitored. However, there’s a debate about whether it makes sense to discourage user engagement and whether noreply addresses lead users to ignore your messages.
As a rule of thumb, noreply addresses may be fine for simple transactional emails such as purchase and signup notifications. However, if you send any type of email that you think might warrant a response, you’ll want to make sure that subscribers know to which address they can actually submit questions to.
The sending domain (which comes after the @) should be the same as your website’s. SendGrid will ask you to confirm your sending domain before you can use it to deliver transactional emails.
Once you do, SendGrid will have you create an API key that you can use to connect the platform with WordPress.
Overall, that’s how the API integration process works with most email service providers. On the other hand, if your SMTP provider doesn’t offer API access (which is unusual), you’ll need to use the manual approach.
Option 3: Configure Your WordPress SMTP settings manually.
Both of the previous SMTP integration methods are available within the WP Mail SMTP configuration wizard and its regular settings page. However, you are not limited to these built-in integrations.
You can manually connect other SMTP services manually through the wizard, or through the plugin settings as depicted below.
It’s important to note that we don’t recommend this approach unless the SMTP provider that you choose isn’t supported by the plugin out of the box. In that case, you might be better off using a different WordPress SMTP plugin that does offer direct integration with your preferred platform.
That’s because by using this method, you’re storing your email service credentials within your WordPress site’s database. This is less secure than the other two approaches. For better security, you can adding your SMTP Username and SMTP Password to your site’s configuration file using constants. However, this requires you to add some code to your site’s wp-config.php file, which can be intimidating for beginners.
If you are comfortable editing your core files and want to connect an SMTP provider with WordPress manually, the plugin will ask you for the following information.
The first two things that you’ll need are your email service provider’s SMTP host and port information. In most cases, you should be able to find these details with a quick Google search or within your provider’s documentation. For example, if you use SendGrid, its SMTP host and port would be:
- Ports 25, 2525, or 587 (for unencrypted or TLS connections) or 465 (for SSL connections)
Keep in mind that the port number may vary depending on what type of connection or encryption you want to use. Finally, you’ll also need to enter your account credentials for your SMTP provider and save your settings.
Once you do that, you’ll be able to send a test email by jumping to the WP Mail SMTP > Email Test tab:
In fact, we recommend that you send a test email regardless of which approach you choose. That way, you’ll know if your WordPress SMTP settings are configured correctly.
Ensuring Email Deliverability With SMTP
Although WordPress is capable of sending emails, you may encounter deliverability issues if you rely on its built-in PHP mail function. If you’re planning on sending out dozens or hundreds of emails per day, you’ll need to use SMTP instead.
Which SMTP provider you choose is up to you, but there are several options that offer generous free plans. As for which WordPress SMTP plugin to use, all of the ones listed above are a safe choice that suppors multiple SMTP integration methods.
If you want assistance configuring WordPress to send emails via SMTP, there are services that will help you get set up with the best provider possible. With a premium maintenance service, you can increase the deliverability of your WordPress transactional emails and optimize your email marketing campaigns.
Editor's note: This post was originally published in May 2021 and has been updated for comprehensiveness.