Getting your WordPress website to send emails reliably can be a pain for many. Strict server rules combined with the plethora of options & platforms can turn this into a complicated matter. In this article, we provide a set of pointers that should be checked not only where issues exist but also to ensure a solid email configuration. The sections are ordered according to their complexity.
WordPress Basic Configuration:
The first thing to ensure you have set is the Email Address field in General Settings.
Contact Form 7 Settings
If you need a contact form on your website, then you should consider using Contact Form 7. With 5+ million downloads it’s the standard when it comes to contact forms for WordPress. Once you have the form set up, the setting you need to check is in the Mail tab in each form.
Correct SPF Settings
before proceeding any further check that your MX and TXT Records are set correctly. This means checking that your Sender Policy Framework (SPF) records are set and enforce the relevant rules. There is a lot of information online about SPF records and how to form them, but the most common version of it, allows your server, Google’s server and your IP address to send emails. The structure is:
Value: v=spf1 a mx ip4:<your site’s IP> include:secureserver.net include:_spf.google.com ~all
You can always ask your hosting tech support to check if this is correct for your site.
MX Entry: Enable Remote Server
If following the above steps your site is not sending emails, you may need to change the configuration of your hosting providers in terms of how it handles external email. You may need to contact your hosting provider for this step. For GoDaddy, this is done in cPanel, under Email > MX Entry. Once you select the domain in question, you can select “Remote Mail Exchanger”
WP Mail SMTP For Alternative Options
In many cases, your WordPress website may not be able to send emails using the default php configuration. In this case you need to download and install WP Mail SMTP by WPForms. This will enable you to change to an SMTP solution or even better Mailgun. Once you install the plugin, you can update the setting for the ‘From’ email field, and send a test email. If this is still not working, you can test your SMTP setting if you know them or your Gmail settings.
Opt for Mailgun
Mailgun is a great tool that will guarantee email delivery for free (for under 10,000 emails monthly). The main steps involved in setting this up are:
- Create an account with Mailgun
- Add a domain and acquire the relevant TXT records required for validation
- Go to your hosting account DNS settings and add the newly acquired TXT records
- Validate the domain back in Mailgun and acquire the keys for WordPress
- Go back to your website, Mailgun settings and add the acquired keys.
Full on Anti-spam and anti-malware protection with DKIM
If you are experiencing spam and phishing issues with your email, DKIM (DomainKeys Identified Mail) would be the solution to check. DKIM ensures that spoofers can not send emails that look like they are coming from your domain.
There are two steps in setting up DKIM:
- Updating CNAME records based on your domain
- Enabling DKIM on your Office 365 setup.
For full on instructions on how to enable DKIM see here
If you have any questions regarding email and your WordPress website installation, fell free to get in touch or comment below!