Email has always been one of the most elusive things to try to figure out when it does not work.
This is a visual tutorial for developers, designers and WordPress masters on how to send emails from your WordPress website.
Having contact or inquiry forms on your website is great, but only if you can receive emails in a timely fashion and not have to hunt within your ‘junk’ email folder.
To assist with this, we recommend WP Mail SMTP by WPForms. There are alternate SMTP plugins out there as well, but for this example, we’ll use this one.
Steps for email delivery
Here is an overview of what is required to setup:
- Review plugin settings
- Create sub-domain on domain account that serves to send and receive emails.
- If on CloudFlare, add the new A records to CloudFlare (txt records also if applicable)
- Validate SSL certificate on new sub-domain by running AutoSSL within cPanel
- Create new email account on new sub-domain (i.e. firstname.lastname@example.org)
- Check email deliverability settings within cPanel
- Configure the plugin settings
By default, the plugin settings show the ‘Default’ as being ‘php’ – otherwise, the php is sending out emails.
We want to change the setting to ‘Other SMTP’
Before we fill in the SMTP Host, we first need to create a new email account on the web server.
Create a sub-domain
Many times, your customers or clients could be using 3rd party email services such as Google Business Apps for email. The main email address is usually tied to the main domain and related MX records point to the service.
On the web server we set up a sub-domain with a dedicated SMTP email account for sending emails.
A good example would be:
’email’ becomes the sub-domain, or you can use whatever name for the sub-domain.
- Create the sub-domain
Validate SSL on sub-domain
Within your cPanal account, run AutoSSL and validate the new sub-domain so you see something similar to below.
In this case, we are validating ’email.your-domain.com’
Create New Email Account on Sub-Domain
Simply create a new email account on sub-domain
By default, you should see this
This is what we want and this is what we are going to fix.
- Click on the ‘Manage’ button and go get the SPF record.
If you have set up your DNS properly, you will the DKIM record properly configured already.
- Add the SPR txt record to your DNS registrar
What we want to see within cPanel is:
If you see this, you are good for next step.
Go back to the new email settings and gather your ‘outgoing server’ details.
Back to plugin settings …
Adjust SMTP plugin settings
Here is a simple screenshot of values that should work
- Encryption: TLS
- SMTP Port: 587 (your web server may be different)
- Authentication: ON
When ready, run an ‘Email Test’
You should get the email now.
You’re happy as you have learned something new and you client is happy for now they can receive emails.
Did we miss a step in this quick tutorial?
Did this work for you?
Would love to hear your feedback on how we can make this tutorial better or if something is missing.