System Emails

I had a little time over the weekend to work on how WordPress handles system emails and document it. One of the first things I configure with PHP on a server is to remove the mail() function. I also like to change the default ports for mail. WordPress handles it’s system email using the PHP mail() function. The major problem is that it can be unreliable for deliverability and is sometimes the target of spammers and hackers.

In my security doc, I recommend outsourcing mail from your server. I almost always reroute all system email through SMTP ( Simple Mail Transfer Protocol ) by adding settings in the theme that allow the site owners to configure a number of third party email services.

I’ve found that the best choice for a third party provider is the one they are already using… Microsoft, Google, etc. The only time I recommend otherwise is if the site has a high volume of transaction emails like a membership or an e-commerce website in which case I recommend Mailgun or Amazon SEC ( Simple Email Service ). I think this is pretty easy configuration for most folks to handle. It’s generally set it and forget it.

I wrote a custom html email template for the ‘test email’ feature in the theme settings. Perhaps I’ll make the time later on to pre-configure a built in email theme that matches up to the site theme using the logo, fonts, and color scheme.


References: