Skip to main content

Ensuring That Emails Sent by WordPress are Delivered Properly

Updated this week

Depending on the site there could be a lot of mail sent out from WordPress. The messages could be for example newsletters, contact requests from forms, order confirmations of webshops or reminders to renew passwords. These kinds of messages are basic functions for many sites and securing the flow of emails is an important part of a well-functioning website.

In Seravo the email solution for WordPress has been structured for the customer so that the WordPress' emails are sent in the proper way. This is turn guarantees the best probability for the WordPress' emails to reach their destination. Seravo's email service works calling the PHP mail() function directly and automatically, and the customer won't have to take any extra measures.

All outgoing mail goes through a service specialized in delivering email (at the moment Seravo uses Sendgrid). At the same time the amount of outgoing mail and their delivery is followed to detect bigger disturbances. The domains registered by Seravo have always all SPF and DKIM records that affect spam filtering set correctly. And if the customer chooses to handle the domain upkeep by themselves, the SPF and DKIM records can be set by following Seravo's instructions.

Troubleshooting Email Delivery Issues

Any temporary issues are quite common due to the global nature of email. The recipient's emailbox might be full, their address might have changed or – as is most common – the recipients' spam filter erroneously handles email sent by WordPress as spam. This might be result of the message seeming like spam or because the sending address and settings are wrong.

Firstly, you should check your log files /data/log/php-mail.log and /data/log/mail.log for what happens when your WordPress website is sending email. If the log files have no events recorded, the issue might be with the PHP source code, your theme or a plugin. If this happens, email has not been sent. If you can identify that email has been sent, the issue is with the receiving end.

To test email reception, Seravo supplies a command line tool wp-mail-test. It requires a receiving email address and can be given a sender address as an optional parameter.

wp-mail-test [email protected] 
Sending test mail from [email protected] to [email protected]...
Test email sent!
Waiting for 5 seconds before checking the logs...

--> /data/log/php-mail.log
[01-Dec-2017 10:35:47 Europe/Helsinki] mail() on [/usr/local/bin/wp-mail-test:40]: To: [email protected]
-- Headers: From: [email protected] Reply-To: [email protected] X-Mailer: PHP/7.0.25-1+ubuntu14.04.1+deb.sury.org+1

--> /data/log/mail.log
Dec 01 10:35:47 host=172.17.42.1 tls=off auth=off [email protected] [email protected] mailsize=285 smtpstatus=250 smtpmsg='250 2.0.0 Ok: queued as D146D41E67' exitcode=EX_OK

It is possible to send to multiple addresses and then analyze where messages are received. If the message is received in some inboxes and undelivered in others, it's possible to deduct the possibility of email not being forwarded at all. If so, the issue can be solved by working with your email service maintainer to investigate why the other email service does not receive the message.

We also suggest you try Mail-tester.com. You can send test messages to the service and it gives a report on how similar the messages were to actual spam. Using the report you can make your email look less like spam.

Troubleshooting Microsoft 365

When email has been proven to work as intended by using the previous steps but the message is still not received, you need to contact your email service provider.

Contacting Your Email Provider

It's crucial to contact your M365 service provider, who will guide you in troubleshooting any issues with sending email. The service provider might be the company which provided the M365 license or the Microsoft support. For troubleshooting the issues an M365 admin account must be configured so that necessary modifications can be made. You can contact the Microsoft support via their support pages.

Marking Incoming Email as Non-Spam

There is an array of methods for the admin to ensure that incoming email is not directly dumped into the spam folder. You can read more about enabling certain IP addresses and modifying spam filters for example in these two support articles.

If the email is marked as spam regardless when using Microsoft 365, you can send the messages to the Microsoft support team for further analysis.


Please note that if you're using an external SMTP service you can delist their IP addresses from M365 services spam lists by using the delisting form.

Sendgrid IP Addresses Used by Seravo

Seravo uses Sendgrid to send customer email from the sites. In the service we have currently two dedicated IP addresses 168.245.98.128 and 168.245.18.183.

Did this answer your question?