Skip to main content
Back to Insights

Email that arrives: transactional mail done properly

Valentin Zsigmond
Valentin ZsigmondMay 29, 20266 min read

Every website sends email. Password resets, order confirmations, contact form notifications, the message that tells your sales team a quote request just came in. Almost nobody mentions these when they describe what their site does, and that is exactly the problem. Transactional mail is invisible right up until the moment it stops arriving, and when it stops arriving, it fails silently. The site looks fine. The form says thank you. And somewhere, a customer is waiting for a reply that will never come, quietly concluding that you ignored them.

We treat the mail a website sends as infrastructure, in the same category as DNS or TLS. It gets designed, configured, monitored, and tested, because assuming it works is not a plan. Here is what that looks like in practice, and why we think every site owner should know at least the shape of it.

The mail nobody sees until it fails

There is a useful distinction between the newsletters a business chooses to send and the mail a website has to send. Marketing mail is a campaign: someone writes it, schedules it, and watches the open rates. Transactional mail is a side effect of the site doing its job. A visitor fills in a form, an order goes through, an editor resets a password, and a message has to leave the building and land in the right inbox within seconds.

Because nobody is watching a dashboard for it, transactional mail earns none of the attention that marketing mail gets, while carrying far more consequence per message. A missed newsletter is a shrug. A missed order receipt is a support call. A missed form notification is a lead your competitor answered first. So when we take a site into our care, one of the first things we check is the path every one of those messages travels, from the code that composes it to the inbox that receives it.

Deliverability is earned, not assumed

The receiving side of email has become strict, and for good reason: the world is full of forged mail. Large mail providers now expect the sending domain to prove, cryptographically and through DNS, that a message really came from where it claims to come from. Mail that cannot prove this gets filtered, delayed, or dropped, often without anyone being told.

This is why a website that simply hands messages to whatever local mail program the server offers tends to drift into trouble. It might work today and degrade next month, because deliverability is not a switch you flip once. It is a reputation you earn and keep. The technical ingredients are well known: mail leaves through an authenticated SMTP connection to a proper mail service, SPF records declare which servers are allowed to send for the domain, and DKIM signatures let the receiving side verify that the message was not tampered with and genuinely originates from the domain in the header. None of this is exotic. All of it has to be configured correctly, together, and kept correct as the site and its DNS evolve.

One authenticated path out

Our rule is that a site has exactly one way to send mail: an authenticated connection to a known mail service, with credentials that are stored securely and can be rotated without touching code. Every message the site sends, whether it comes from the core system, a contact form, or a custom feature, travels through that same path.

A single path matters more than it might sound. When all mail flows through one place, you can reason about it. You can see what was sent and when. You can rotate a credential in one move if it ever needs rotating. And when something does go wrong, there is one connection to inspect rather than a scavenger hunt through every module that might be sending mail its own way. It is the same instinct we apply everywhere in our infrastructure work: fewer paths, better understood.

Watching that mail actually flows

Configuration is the start, not the finish. The failure mode we respect most is the silent one: everything configured correctly last year, and then a DNS record edited for an unrelated reason, a credential expired, or a mail service policy changed. The site keeps happily composing messages, the messages keep quietly not arriving, and nobody notices until a client asks why the contact form has been dead for three weeks.

So we monitor mail the way we monitor uptime. We verify that the sending path works, not just that it is configured, and we keep an eye on the DNS records that deliverability depends on. When something in that chain drifts, we want to be the ones who notice, on the day it drifts, rather than reconstructing the timeline afterwards from a puzzled email that arrived through some other channel. Quiet systems deserve loud monitoring, precisely because no human is watching them day to day.

Staging can never email a real customer

There is a second half to doing mail properly, and it is about safety rather than delivery. Every site we run has non-production environments: a local copy on a developer machine, a staging environment where changes are reviewed before release. Those environments run the same code as production, which means they will happily try to send the same mail as production. Imagine testing an order flow on staging and having the system send a very real confirmation email to a very real customer about an order that does not exist.

On our platform, that cannot happen, and the word cannot is doing real work in that sentence. Non-production environments are physically unable to deliver mail to the outside world. Outbound mail traffic is blocked at the environment level, and everything the site tries to send is redirected into a mail catcher: a tool that captures each message so a developer can open it, check the content and formatting, and confirm the flow works, without anything ever leaving the building. Nobody has to remember to flip a setting, and no misconfigured module can find a way around it, because the restriction lives below the application.

The result is a kind of freedom that is easy to underrate. Developers can test password resets, order confirmations, and notification flows as aggressively as they like, on realistic data, with zero chance of a stray message reaching a real inbox. Safety that depends on everyone being careful every time eventually fails. Safety that is built into the environment does not.

What this means for you as a site owner

You do not need to remember what SPF stands for. But there are a few questions worth being able to answer about any site you depend on. Does the mail it sends go through an authenticated service, or through whatever the server happens to offer? Are the DNS records that mail providers check actually in place and correct? Would anyone notice if form notifications stopped arriving tomorrow? And can a test environment ever send real mail to real people?

For the sites we look after, the answers are: authenticated always, yes and monitored, yes within the day, and no, structurally. That last pair is the part we care about most. A website that reliably delivers its mail, and provably cannot misdeliver it from the wrong environment, is doing something unglamorous and important: it is keeping every small promise it makes. The form that says a message was sent is telling the truth. Most of the trust a business earns online is built out of exactly that kind of small, kept promise.

Share this article
Valentin Zsigmond
Written by
Valentin Zsigmond
Founder & Lead Engineer

Full-stack Drupal architect with almost two decades of experience leading large teams in enterprise environments. Founded Tilizy Digital to bring senior-level expertise directly to the organizations that need it. Mentor to dozens of Drupal developers and creator of SDX — a Drupal extension for building modern frontends with React and Vue.

Enjoyed this article?

If this resonated, imagine what we could do working together on your Drupal site.