Gravity SMTP: Send WordPress Emails Reliably Using SMTP Services
By Colin Newcomer Published April 11, 2024From password reset emails to new user registrations, form notifications, and more, most WordPress sites need to send a lot of transactional emails.
However, many WordPress websites are unable to send emails reliably. And, on some hosts, the default email mechanism might not even work at all, which means those important emails might have zero chance of making it where they need to go.
Connecting your WordPress site to an email sending service/SMTP service can help you fix that. Setting this up ensures that your site is able to send emails reliably and that those emails actually make it to users’ inboxes and avoid their spam folders.
In this post, you’re going to learn everything that you need to know about sending emails in WordPress, including how the new Gravity SMTP plugin can help you send all of your site’s emails using your preferred SMTP service (not just the emails from Gravity Forms!).
Why Do You Need an SMTP Service for WordPress?
In its default configuration, WordPress sends its emails using the wp_mail() function, which is based on the PHP mail function.
The advantage of this approach is that it doesn’t require any configuration because it relies on your site’s server to send emails. Assuming the host supports it, WordPress can send its emails right away without any further setup.
However, there are a couple of problems with this approach.
First off, not all hosts support it. So, in some situations, your WordPress site might just flat-out not be able to send any emails, which is obviously a problem.
However, even for hosts that do support this email method, a more common problem is that it’s not reliable. Sending your site’s emails like this lacks proper authentication protocols, which means your site’s emails are much more likely to be flagged as spam.
So, even if your site is able to send emails, people still might not actually see those emails because they’re getting filtered out to users’ spam folders or otherwise getting lost in transit.
If you’re only sending emails to yourself, this might not be an issue because you can just create a custom filter in your email client to stop flagging your site’s emails as spam. But if you want to send emails to other users, it’s a big problem.
How an SMTP Service Can Fix WordPress Email Problems
An SMTP service, AKA an email delivery service or an email sending service, is a service that’s 100% dedicated to reliably sending emails.
Popular names here include SendGrid, Mailgun, Postmark, Amazon SES (Simple Email Service), and many others.
If your host doesn’t allow WordPress to send emails using your hosting server, setting up such a service will enable WordPress to send emails by routing them through the dedicated email sending service.
And even if your host does allow sending emails, using a dedicated sending service will help ensure your emails make it past recipients’ spam filters because dedicated sending services emphasize managing their sender reputations and also let you add important authentication technologies to make your emails seem more legitimate.
Gravity SMTP Makes It Easy to Connect to an SMTP Service on WordPress
The only issue here? WordPress doesn’t include a built-in feature to let you connect to an SMTP service!
That’s where our Gravity SMTP plugin comes in.
With Gravity SMTP, you can easily connect your WordPress site to dedicated email sending services like SendGrid, Postmark, Mailgun, and more.
Once you’ve set things up, your site will start sending all of its emails using your chosen email sending service – including those from Gravity Forms, as well as core WordPress emails and emails from other plugins that use wp_mail.
We’ll talk about the features in more depth in a second. But first, let’s talk about another question that you might have if you’re already familiar with Gravity Forms.
Doesn’t Gravity Forms Already Offer SMTP Add-Ons?
Yes! To help you ensure that your form notification emails make it to users’ inboxes, Gravity Forms already offers official add-ons for some popular SMTP providers, including SendGrid (full tutorial here), Postmark, and Mailgun.
One of the key details about Gravity SMTP is that it’s not just for form notification emails – it’s for all of your WordPress site’s emails.
Beyond the notifications for forms that you’ve created with Gravity Forms, that includes core WordPress emails (password resets, new user registrations, new comment notifications, and so on), as well as transactional emails for other plugins that use the wp_mail function.
You can think of Gravity SMTP as a complete replacement for the default WordPress PHP mail configuration (wp_mail). If an email would have been sent with wp_mail, it will now be sent with whatever email delivery service(s) you’ve configured in Gravity SMTP.
Do You Need to Use Gravity Forms to Use Gravity SMTP?
While Gravity SMTP works great with Gravity Forms, you actually do not need to have the Gravity Forms plugin installed on your site to use it.
For example, maybe you’re just looking for a simple solution to make sure your site can reliably send its password reset emails.
Gravity SMTP can still help you get that done, even if you haven’t installed the Gravity Forms plugin on that specific site.
With that being said, you will need an active Gravity Forms Elite license to access the Gravity SMTP plugin.
Gravity SMTP Features: A More In-Depth Look
Here are some of the most helpful features that you get access to with Gravity SMTP…
Connect to Different SMTP Providers With Built-In Integrations
With Gravity SMTP, you’ll be able to easily connect to reliable email delivery services via built-in integrations for SendGrid, Postmark, Mailgun, and Brevo (with more integrations on the way).
Or, you can also manually connect to any SMTP service via a custom SMTP option, such as your host’s SMTP sending service (if it’s reliable).
Gravity SMTP will make these providers, along with other providers, available via a single interface. As we continue to develop Gravity SMTP, we’ll add even more out-of-the-box integrations to give you even more options for choosing an email delivery service.
Once you’ve set up a provider in Gravity SMTP, you’ll be able to easily toggle it on or off as needed.
Head on over to our Gravity SMTP Roadmap and let us know what future features and integrations are important to you.
Send Test Emails
To help you more easily test and debug your site’s notification emails, Gravity SMTP includes a feature to let you send test emails via whatever sending service you’ve chosen to use.
Sending test emails helps you verify a few key pieces of information:
- You’ve properly connected your site to your chosen SMTP service.
- Emails are actually being sent.
- Emails are avoiding the spam folder.
You can enter any email address and instantly fire off a test email with the click of a button.
If the test email fails to connect for some reason, Gravity SMTP will alert you right away with an explanation about what the issue is.
Track Your Emails in a Detailed Log
With transactional emails, there’s a certain amount of trust involved. Sure, you can test and debug things when you first set up your site. But after that, you have to trust that your emails are continuing to work as intended.
But with Gravity SMTP, you can now track your transactional emails in full detail with a complete email log located within your WordPress dashboard.
The email log feature will track every email that your site sends to people.
At a glance, you’ll be able to see the following information:
- Email status
- Recipient email addresses and associated avatars
- Plugin source, enabling you to see which plugin each email has originated from
- Date/time sent
Here’s an example of a log with successful entries and a failed entry – you can see how Gravity SMTP makes it easy to quickly see if your site is having issues.
If you click on an email, you’ll be able to see additional information about that specific email including the following including which email sending service it was sent with.
You can also also view the email sent in its original format directly from the email log table, as well as from within an individual email log. This allows you to conveniently review the content and check for any potential errors or formatting issues.
To help you control the size of your email log, you can customize your log retention period. This can be especially helpful if your site sends a lot of emails, as the log might grow quite large if you never delete older entries.
Here are the options that you have for the log retention period – any log entries older than the time you select will be deleted:
- Never delete (permanently store all log entries – be careful using this approach if your site sends a lot of emails)
- One day
- One week
- One month
- Three months
- Six months
- One year
Or, you’re also free to completely disable the email logging feature.
Enable Test Mode to Easily Test Your Site’s Emails
In addition to sending test emails, Gravity SMTP also offers a Test Mode feature that can help you test your site’s emails.
Instead of manually sending a test email, Test Mode has your emails work as they normally would. However, instead of trying to deliver the emails externally, it just simulates how those emails would work and stores them in the log.
For example, maybe you want to test your form notification emails on a development site, but you don’t want to actually send those emails to an external email address.
With Test Mode, you could fill out the form and then just check the email log to make sure emails are being sent as you intended.
For in-depth information on Gravity SMTP, please check out the documentation.
Try Gravity SMTP Today
That wraps up our introduction to our new Gravity SMTP plugin.
Whether you’re looking for help with Gravity Forms notifications, core WordPress emails, or emails from other plugins that you’re using, Gravity SMTP can help you get the job done.
If you’re already holding the Gravity Forms Elite license, you can download the Gravity SMTP plugin today from your Gravity Forms Account dashboard.
If you want to keep up-to-date with what’s happening on the blog sign up for the Gravity Forms newsletter!