Mail handling. Really.
Of all the ways to make your web site “sexy”, I’ll bet a dollar that mail handling doesn’t make the top ten on your radar. But I’m here to try to change your mind about that.
Email correspondence from a company
When you receive an email from a company, but it is from a Free “hotmail” or “gmail” account, do you suspect its legitimacy? Of course you do. Most people do. And if you don’t, you should. In a world where Phishing is the easiest way to compromise sophisticated computer systems, email legitimacy should be everyone’s concern.
Lost password correspondence
How about when a visitor forgets their password? Exactly, they need to positively receive a password replacement email. Even worse, how about if you as the Administrator lose your password? You absolutely must receive that password replacement email.
WordPress handles outbound mail via a php handler, which might work fine. Or… it might not work so fine. Whatever the case, it is a good idea to test it.
My recommendation is to use a TLS compliant mail service, either one provided by your host company, or a third party service. When you go to search for a service, you’ll find hundreds of options — MailChimp, TurboSMTP, SendPlus just to name a few.
After much research into many different third party mail handlers, I settled on MailJet. Why?
- Their perpetually free tier is 6000 messages/month (200/day), which is sufficient for my needs. Many of the other options give free up to a few months or up to a few tens of thousands of messages. As you may know from my other posts, I am a supporter of all things free. I was specifically interested in supporting a company that provided free services.
- The free tier allows both marketing and transactional emails. Some of the companies only allow free marketing emails, but explicitly disallow free transactional emails. For example, MailChimp spells out that transactional emails such as password resets are explicitly omitted from the service, and a different service called Mandrill must be used: “Mandrill can be used for personalized, one-to-one e-commerce emails, as well as automated transactional emails like password resets, order confirmations, and welcome messages.”
- The free tier tracks email delivery. You can get reports on what has been delivered, what has bounced, what winds up in SPAM, and other artifacts. It even reports on when emails are ultimately opened, and when an email is clicked on. Note that the tracking is not perfect, but it does exist.
Setting up the system
Regardless of the system you use, configuration is as simple as 1…2…3.
Create a MailJet Account
First things first, create a MailJet account. A few recommendations:
- Go to Mailjet.com
- Create a unique Mailjet account for each domain that you manage. This way you’ll be able to manage problems with mail sending independently from each different domain. Otherwise things will get more difficult during the SPF/DMARC testing later on.
- I recommend using a domain email as the username. Using a domain email just simplifies the rest of your life later. This way you’ll be able to remember which account is attached to which domain.
- Select “I’m a developer” so that you can “Access all the details to integrate Mailjet with your tools and send emails quickly”. This will be required to integrate into any platforms such as WordPress (via Plugin) and PIM (explained later). For now, just select this option
You have successfully created a Mailjet account! Log out and log back in to test your account. Make sure to record your password somewhere.
TEST: That you’ve logged out and logged back in indicates that your account creation was successful
Set up domain authentication
The second step in this process is to approve that your domain can actually send through MailJet. The process is quite simple and straightforward, but if done incorrectly it is going to take you a long time to figure out you are getting nowhere.
You’ll need access to the domain’s DNS. DNS (Domain Name System) is the roots of the domain. When modifying the DNS records, be aware that improperly changing the DNS records can yield the domain inoperable. The two records that must be modified are simple to do, and if you follow the directions properly there will be no problems at all. If you do not have access to the domain’s DNS, or you are uncomfortable modifying DNS, then you might consider finding someone to help you out.
Here are the steps:
- Go to “My Account”
- Go to ” Setup SPF/DKIM Authentication”
- Go to “Manage”
- Follow the directions to configure “Set up SPF”
- Follow the directions to configure “Set up DomainKeys/DKIM”
TEST: You will know you are complete when you get Double Green notifications.
Integrate into WordPress
Mailjet Integration into WordPress is made very easy by way of a Plugin. By doing so, all emails sent from your WordPress instance on your domain are actually handled by Mailjet. Let’s consider, why would you even want to do this if you are already getting emails from your domain? For several reasons, one of which is that this way emails from your domain to your users are actually tracked
Here are the steps:
- First, obtain the Mailjet USERNAME an PASSWORD by
- logging into Mailjet.com
- going to My Account
- clicking on SMTP and SEND API Settings
- Keep the USERNAME and PASSWORD handy, you’ll need them shortly.
The rest of the task is completed within WordPress. Log into WordPress as an admin and do the following
- Install and Activate the Mailjet Plugin in WordPress
- Open the Mailjet Settings on WordPress
- Enter the appropriate credentials (both the USERNAME (API KEY) and PASSWORD (SECRET KEY) are necessary)
- Configure the following parameters:
- Enable email through Mailjet (Enabled)
- Enable SSL communication with mailjet.com (doesn’t matter, we’ll be recommending 587 in the next bullet)
- Port to use for SMTP communication (select 587)
- Send test email now (Sure, why not! Email is free!)
- Recipient of test email (for example, email@example.com)
- From: email address (use one of the configured email addresses on your domain). Note, this email address will be the From email for all emails sent from the WordPress instance to any of your users, such as password change requests.
Now, click Save Options.
TEST: You should receive a test email to the email address that you specified above. If you do not receive this test email, then you need to diagnose the system.
Integrate Mailjet into your favorite mail software
Finally, integrate the mail handler into your favorite email software. To get a little technical but still keep this simple, Email software is called Personal Information Manager (or PIM). Common PIMs are Outlook, Thunderbird, the hotmail web interface, and the gmail web interface.
I use gmail as the PIM, and configure a “send as” account that attaches to MailJet. Here are the steps to integrate Mailjet into the gmail web interface:
Open gmail.com and log in with your normal gmail account that you’d like to use to send emails on behalf of this domain
- Open the Settings
- Open the “Accounts and Import” tab
- Click “Add another email address”
- Add the name that you’d like to be known by, as well as an email address that you’ve configured in Mailjet
- Add the Username, Password, and
- Save changes
And you are done!
Now, test the gmail/PIM integration by sending an email “From” your domain “To” Somewhere. If it doesn’t work, then you’ll have to do some investigation which is beyond the scope of this tutorial. However, feel free to email me and I’ll do what I can to help you out.
Email is important. Whether it be to email blast your customers, or contact them for specials, or request payments, or simply to say hello, email is a critical communications component of any business.
This article explored a consideration to configure domain based outbound email. By the end of the tutorial, you should be able to send both group and single transactional emails to your friends, family, and customers.
If you need any particular help with your domain, contact me via email.
A few notes as you consider mail handling
- Keep it simple. The simpler the better.
- Keep your clients protected and your reputation clean by tightening down your domain’s SPF and DKIM. Test them both vigorously.
- Test your site with mxtoolbox and ….
- Use a unique MailJet account for each domain.