Send mail via WordPress

Why cant WordPress just send emails?

In 2021 we had to disable mail sending via PHP scripts due to a rise in mail spam and old web applications and a rise of compromises in CMS systems. This protects not only our mail server from getting black listed but also protects domains being used including your own from getting in trouble if anything happens. This is a change we have seen many hosts make, and one we think all should, most installations and systems DO NOT need to send mail by default.

How to send emails with WordPress

Alright first step is to use a plugin to catch all mail calls and redirect them to a different service, by default normally PHP sends mail without any authentication via the server that is hosting the site. But now we need to send that mail via another method.

WP Mail SMTP by WPForms

Once you have a plugin like this setup you can use SMTP to send mail via us or a third party email service but you might find that it wont work, more about that below. The best setup is to use SendGrid or SparkPost. Both are recommended as they use API’s and are better at email delivery.


Both SendGrid and SparkPost offer 100 emails per day for free, but for setup SendGrid is easer.

Once you have an account just auth your domain with the service and setup the details in WP Mail. It will tell you what to do. But here is a guide also on getting it all setup.

How to Set Up WordPress Email Notifications with SendGrid + WP Mail SMTP

Why can’t just use SMTP with PHP?

This is not always the case, sometimes it works, but a few versions of PHP for some servers broke SMTP mail sending due to patches to try and fix flaws, and due to this some PHP installs on specific hardware and OS versions are just broken from connecting to a SMTP server. So in cases like that a SMTP relay or API is needed as explained in the content above.