How to send email using SMTP and Office 365 in WordPress

When setting up WordPress websites, there’s a fairly common issue which can sometimes be encountered, relating to the delivery of emails. The problem is that emails sent by the website fail to arrive in your inbox, and you may be left scratching your head as to why they’ve gone missing.

The most common examples of the emails that could be affected are those that should be sent to you when someone sends an enquiry via forms on your website, and the verification email which should be sent when there’s a change of admin ownership for the website in Settings > General.

Initial troubleshooting

The first things to check in these cases should be your SPF (Sender Policy Framework) and DKIM (Domain Keys Identified Mail) records within the DNS for your domain, as these control which servers are permitted to send emails on behalf of your domain – the system is designed to prevent people sending fake email pretending to be you. It’s a little bit technical – but don’t worry, we can happily check this out for you – just ask!

You may still find that the email delivery issue persists even after checking that your SPF and DKIM are correct. In these cases, and particularly if you’re using a 3rd party such as G Suite or Office 365 for your domain’s email hosting, the root cause is probably something else.

The next thing to check should be your Email Routing configuration in cPanel – if you’re using a 3rd party service such as G Suite or Office 365, you should select the Remote Mail Exchanger option.

If that still doesn’t solve it and you’re using Office 365 to send normal email over your domain, the next step is to set up something called SMTP (Simple Mail Transfer Protocol). This makes everything much more robust and reliable and is pretty much guaranteed to solve the problem. It takes a little bit of work to set up – but don’t worry, as always we can take care of all the technical stuff so you don’t have to.

Begin by setting up the Post SMTP plugin

In the following steps we’ll show you exactly how to set up and configure SMTP, to solve your email deliverability problem. You can either follow these steps yourself, or alternatively just let us know if you’d like any help and we’ll be able to do almost all of it ourselves. All we’ll need is for you to login and enter your email username & password (instead of giving them to us, to respect your privacy) – see later steps.

1. Install and activate an excellent free plugin for WordPress called Post SMTP Mailer/Email Log – it’s available for download in the WordPress repository here.

2. Go to the Post SMTP tab in your WordPress dashboard and click the Start the Wizard button.

3. Enter the Office 365 email address that will be used as your admin email for the website, and your company or website name in the Name field. For example, on our own erjjio studios website we use the below – you would replace these with your own details.

4. Click the Next button.

5. The wizard should automatically set smtp.office365.com as the Outgoing Mail Server Hostname.

6. Click the Next button.

7. The wizard should automatically select the recommended Socket as SMTP – office365.com:587 (see below). If your website is hosted with erjjio and this option isn’t available, please let us know and we will enable it for you.

8. In the Authentication section, keep the recommended Password option selected.

Then click the Next button.

9. At this point you’ll arrive on the Authentication tab of the wizard – this is where we need you to enter the username and password for your email account, so you don’t need to share these details with us and your privacy can be respected.

10. You can optionally set up notifications so that you’ll get alerted if your SMTP connection ever breaks. There are options for Email, Slack and a Chrome extension – they are all free and simple to set up, if you’d like to.

11. Click Next.

12. Click Finish.

13. Back in your WordPress dashboard, click Post SMTP – you should now see a message confirming that Postman is successfully configured. To double-check this, click the link to Send a Test Email.

14. Specify a recipient of your choice, then click Next.

15. All being well, you should then see a confirmation that the test was a success, and an email should arrive in the recipient mailbox you specified.

That’s it – all done!

If you get stuck with anything or you’d like our help, please get in touch!

Join our newsletter

Interested in helpful tips, news and exclusive offers?
Join our newsletter and we'll keep you in the loop!

Reader Interactions

Leave a Reply

Your email address will not be published. Required fields are marked *