How to improve your email deliverability with WordPress using SMTP

25 Oct 2024, by Slade Baylis

The share of retail purchases that take place online continues to increase year on year, with fewer and fewer people shopping in physical stores.  As reported by Forbes1,  for 2024 around 20.1% of all retail purchases are expected to have taken place online - and by 2027 this share is expected to increase to 22.6%.  With this being the case, it’s going to be very important to stay ahead of the game by maximising your online presence, and ideally, allowing your customers to shop with you online.

When you are set up to take sales online, making sure that your website is able to send emails is vital.  Not only will this likely be the way that you'll send receipts to your customers, but it’s also how you’ll be notified that you have received an order in the first place.  The last thing you want is to only find out about customer orders when they angrily contact you, upset that they're still waiting for the products or services that they ordered from you to arrive!

By default, WordPress uses the inbuilt  "mail()"  function within PHP – often referred to as "PHP Mail" - to send out emails.  Whilst this function works in most cases, in the situations when your email does not reach its recipient, it’s hard and sometimes impossible to find out why.  Was the email sent at all?  Was it sent but rejected by the recipient?  Was it detected as spam?  Answers to which are difficult to find out if using PHP Mail - due to its intrinsic limitations and the way that it sends emails. 

Even in those cases where the email was sent perfectly fine and the problem lies with the recipient’s email service, there isn’t a way to definitively prove that it was successfully sent, leaving you with no evidence that the fault wasn’t on your end.  That’s why we always recommend and advise all our customers to instead connect and authenticate their websites to an email account via SMTP (Simple Mail Transfer Protocol), so that all of their emails go out via that mailbox instead.

What is PHP Mail and how is it different than connecting via SMTP?

To understand the difference, before going into detail about "PHP Mail", we'll first have to touch on what "PHP" is.  "PHP" is simply the programming language that WordPress is built with and runs on.  "PHP Mail" is a function that is built into that programming language to allow websites and web apps to easily send emails from a web hosting server.  One of the key reasons for its popularity is due to its ubiquity and how easy it is to implement.  All it requires is the website or application to specify the email address to send the email to, the subject of that email, and the message itself.  With PHP Mail being available in basically all hosting environments and not requiring an external email service, WordPress have chosen to use this as their default method for sending emails.

Although this ease-of-use would be appealing, it does have some downsides including that it doesn't authenticate with any email service.  This means emails sent this way are more likely to be seen as potentially unwanted emails and caught by spam filters.  In some cases, depending on how things are configured, your outgoing emails might not pass email authentication checks that are used to validate that your emails are coming from a legitimate source. With email authentication quickly becoming standard and expected by email providers, consequences of emails not being authenticated could very well mean that these emails will not get through to the intended recipients. 

As an example, Google2 introduced a new requirement back in February 2024, requiring that all emails from bulk senders had to be authenticated. This was introduced to allow for their users to be able to more confidently trust an email’s source, as well as reduce the likelihood of spam and phishing emails being received.  With emails sent via PHP Mail sometimes being regarded as sending emails in “bulk” - due to it not using your own email addresses to send the email and instead being sent via the server that your website is hosted on - this requirement by Google can also apply to most emails that are sent using PHP Mail.

It’s for these reasons that setting up your website to connect via SMTP - so that emails are sent through an authenticated email address - is our go-to recommendation for any of our clients that have websites which need to send outbound emails.

Instead of using the default PHP Mail function to send your emails, connecting your website to an email account via SMTP ensures that your emails are sent through that mailbox instead.  This means that the email is just as authenticated as any other emails that you would send out from any other email accounts, thus helping improve its deliverability and likelihood of being received.

Not only that, but the audit trail for outbound emails is much better with emails sent this way.  This means that if things go wrong, it’s easier to find out where they went awry and why.  With this information you’re able to confirm whether an email was sent, whether the emails were rejected, and in some cases why they were rejected.  All of this makes it easier to fix the problem, but also lets clients know and provides evidence if the issue is on their end, instead of yours.

How to configure your website to send emails via SMTP?

The good news is that it’s usually trivially easy to adjust your website to instead send all of its outgoing emails via an email service over SMTP.   For WordPress specifically, due to its modular nature and the ability to extend its functionality via plugins, the process is simply a matter of finding a reputable, highly reviewed, and widely used SMTP plugin.

There are a variety of SMTP plugins available, but here are the two most widely known and used options:

Each of these plugins is simple to set up. After installing the plugin, you simply enter the SMTP connection details for the email account you wish to use, then perform a SMTP connection test within the plugin, and you’re done!  Your SMTP connection settings will be provided by your email hosting provider. 

As long as that SMTP connection test within the plugin comes back successful, your outgoing emails should now start being sent via that connected email address, rather than via PHP Mail.  Of course, we also recommend performing your own manual test after configuring this, just to ensure and confirm that your outgoing emails are indeed being sent and received as expected.

Each of these plugins also offer “Pro” versions of each plugin, which come with more advanced features such as email logging, alert integration for SMS or Slack/Microsoft Teams, conditional email routing, and much more.

For adjusting other applications to connect and send emails via authenticated email accounts, we recommend checking the relevant documentation that’s available on the best way to implement this.  It’s a common requirement that basically all fully-featured website platforms will support in some form.

Have any questions about improving your email deliverability?

If you have any questions about improving the deliverability of your emails on your website, let us know!  We’re happy to discuss different ways to help ensure your emails get to where you need them to go.

You can reach us via email at sales@micron21.com or via phone on 1300 769 972 (Option #1). 

Sources

1, Forbes, “35 E-Commerce Statistics of 2024”, <https://www.forbes.com/advisor/business/ecommerce-statistics/>
2, Google, “New Gmail protections for a safer, less spammy inbox”, <https://blog.google/products/gmail/gmail-security-authentication-spam-protection/>

See it for yourself.

Australia’s first Tier IV Data Centre
in Melbourne!

Speak to our Australian based team.

24 hours a day, 7 days a week
1300 769 972

Sign up for the Micron21 Newsletter