The bane of every website developer’s existence: email deliverability.
While it may be easy to think that email functions much the same way as real mail – you send a letter to someone, it takes a relatively simple path and eventually arrives in the recipients mailbox – in reality it doesn’t at all.
Imagine a world in which there was no cost whatsoever to print and deliver real-world mail. Overnight, you’d be inundated with countless letters from unscrupulous marketers and conmen.
You don’t really have to imagine, because that’s basically what email is.
So how do we prevent spam and malicious emails?
Modern email clients, email hosts, and security providers utilize a massive variety of tools to determine whether a message is spam or not. Using complex algorithms, literally thousands of criteria are used to generate a score which determines the likelihood that a message is spam. Above a certain threshold, a message will be blocked from delivery.
It will likely never even make it to your spam box, which is reserved for messages that are on the cusp.
As the sends of spam get smarter, this threshold gets pushed higher and higher, and it becomes more and more difficult for legitimate emails to make it through. Microsoft Office 365 seems to be one of the strictest, but other providers regularly have issues as well.
So why aren’t my website emails being delivered?
If you have a website, you’re likely familiar with how it can send you contact form submissions along with other types of messages such as purchase confirmations, admin notifications, and more.
But we’re seeing that more and more, these notifications aren’t showing up.
It’s not the website’s fault! More than likely, it dutifully sent the message it was asked to send and completed its task.
And yet, you never got it. Why?
Why website emails don’t get delivered
Among the thousands of criteria used to determine what is and isn’t spam, a handful matter more than others and are more likely to be the cause in this case.
While there are many I could discuss, there is one primary factor.
You see, when you host emails at your domain name, you define a mailserver for your domain. This is the address of the physical server that is in charge of sending “official” mail from your domain.
So in my case, there is one server that officially sends all mail from my addresses ending in @pagecrafter.com.
When you receive an email, your system checks to see if the incoming message was sent by the “official” mail server for that domain. If it isn’t, this adds greatly to the likelihood of a message being spam, because anyone could have sent it.
With a standard website, the emails generated are coming from the website host and as such, are not the “official” mailserver for any domain. Therefor, they are likely to be flagged.
How can I fix it so that the email go through?
The solution is to have the website server route mail through the official mailserver. Like a king sealing a letter with wax and the royal seal, your website can get a stamp of approval from the official mailserver, indicating that the email is, indeed, legitimate.
The way to do this is to send email via SMTP, which is essentially a method of authenticating mail through the official server.
I won’t go into detail about how to set that up here, but there are plenty of tutorials online. The steps will vary depending on your mail provider and how you want to set it up.
If you are our client and we’re also hosting your email, we can get it set up for you quite easily. If you’re hosting elsewhere, we can still help but we’ll need to work with your email host to set up all the connections. Some hosts can’t do it.
Worst case, we can simply use a Gmail address or similar and route all mail through there. It still works!
And that’s basically it! There are, of course, other things you can do to improve deliverability including adding various DNS records and whitelisting the website host IP, but in general, setting up SMTP will solve any problem.