[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"site-version":3,"blog-doc-en-email-transazionali-strumenti":4},"2.2.0",{"id":5,"title":6,"body":7,"category":234,"credit":235,"date":238,"description":239,"extension":240,"faq":241,"image":254,"imageAlt":255,"keyword":256,"meta":257,"navigation":258,"path":259,"related":260,"seo":264,"seoTitle":265,"service":266,"slug":267,"stem":268,"tags":269,"__hash__":275},"blog\u002Fen\u002Ftips\u002F2026-10-28-email-transazionali-strumenti.md","Transactional email: the tools I use to build, test and send it",{"type":8,"value":9,"toc":222},"minimark",[10,14,17,22,25,28,32,53,56,60,67,70,74,84,91,95,98,120,133,136,140,143,185,189,197,205,209],[11,12,13],"p",{},"Email is the part of a web project that hardly anyone puts in the quote and almost everyone notices when it breaks. The order confirmation that lands in spam, the password reset that never arrives, the contact form notification nobody has read for weeks: these problems hurt the user experience as much as a slow page, yet they stay invisible until a customer picks up the phone. To me email is a fundamental tool, too often overlooked, and it deserves to be designed, built and tested like any other interface.",[11,15,16],{},"I got here step by step. I started out writing email HTML by hand, table inside table, and sending tests from servers that presented themselves with a swapped sender address and no authentication at all. It worked, until mailbox providers started trusting less and less anyone who could not prove they were who they claimed to be. Today I work differently, and the tools I use tell the story of what has changed.",[18,19,21],"h2",{"id":20},"why-email-is-a-hard-interface","Why email is a hard interface",[11,23,24],{},"The first problem is rendering. A modern browser follows the standards; email clients do not, or each does so in its own way. Outlook for Windows still uses Word's engine for layout, Gmail strips part of the styles, mobile apps handle dark mode by inverting colours in different ways. That is why email HTML is still made of nested tables, inline styles and fixed widths: techniques the web left behind years ago.",[11,26,27],{},"The second problem is delivery. A well-built email is worthless if the receiving server does not trust the sender. The reputation of the domain and IP address, authentication and content decide whether a message reaches the inbox, the spam folder or nowhere at all. And developers often never find out, because in their own tests everything arrives.",[18,29,31],{"id":30},"mjml-components-instead-of-tables","MJML: components instead of tables",[11,33,34,35,39,40,44,45,48,49,52],{},"For the code I use ",[36,37,38],"strong",{},"MJML",", a component language designed for email. You write tags such as ",[41,42,43],"code",{},"\u003Cmj-section>",", ",[41,46,47],{},"\u003Cmj-column>"," and ",[41,50,51],{},"\u003Cmj-button>",", and the compiler produces the table-heavy, inline-styled HTML that clients expect, Outlook fixes included. The gain is not just time: the source stays readable, splits into reusable parts (header, footer, button) and is versioned in Git along with the rest of the project.",[11,54,55],{},"MJML has a limit worth knowing: it compiles static HTML. The data (customer name, order lines, confirmation link) has to be inserted afterwards, with the project's template engine. I keep the two steps apart: MJML for the structure, compiled once, and the data filled in at send time.",[18,57,59],{"id":58},"mailpit-testing-without-bothering-anyone","Mailpit: testing without bothering anyone",[11,61,62,63,66],{},"In development I use ",[36,64,65],{},"Mailpit",", a fake SMTP server with a web interface. The application sends it emails exactly as it would to the real service, but Mailpit holds them and shows them: HTML, plain-text version, headers, attachments. I can run a sign-up flow ten times in a row without filling real inboxes and without the risk of writing to a customer with test data.",[11,68,69],{},"It is the opposite of how I worked at the beginning, when tests really went out to my own addresses with improvised senders. With Mailpit the development environment is closed: nothing leaves until the code is in production. It also runs a basic check of the HTML and links, handy for spotting an unsupported tag early.",[18,71,73],{"id":72},"brevo-mailjet-and-now-resend","Brevo, Mailjet and now Resend",[11,75,76,77,48,80,83],{},"For sending I used ",[36,78,79],{},"Mailjet",[36,81,82],{},"Brevo"," for a long time. They are complete platforms: visual editor, lists, campaigns, statistics, and in Brevo's case SMS too, which I used when a project needed phone notifications. They remain a good choice when whoever runs the site has to prepare newsletters on their own.",[11,85,86,87,90],{},"For transactional email, which is triggered by code rather than by a person, I am now moving to ",[36,88,89],{},"Resend",". The reason is how comfortable it is for developers: a simple API, official libraries for Node and the other common languages, guided domain verification, and webhooks telling you whether a message was delivered, bounced or marked as spam. It fits nicely with the serverless functions I already use for forms and APIs, and the workflow stays the same as the rest of the project: code in Git, keys in environment variables, a test in a preview before going live.",[18,92,94],{"id":93},"authentication-spf-dkim-and-dmarc","Authentication: SPF, DKIM and DMARC",[11,96,97],{},"This is the biggest difference from how I worked years ago. Sending email with an arbitrary sender and no authentication today means landing in spam or being rejected. There are three records to set up in the domain's DNS:",[99,100,101,108,114],"ul",{},[102,103,104,107],"li",{},[36,105,106],{},"SPF"," lists the servers allowed to send on behalf of the domain.",[102,109,110,113],{},[36,111,112],{},"DKIM"," signs every message with a cryptographic key: the receiver checks that the email was not altered and really comes from the domain.",[102,115,116,119],{},[36,117,118],{},"DMARC"," says what to do with messages that fail the checks (nothing, quarantine, reject) and where to send reports.",[11,121,122,123,126,127,132],{},"The part that is often neglected is ",[36,124,125],{},"monitoring",". DMARC should be introduced gradually: first in observation mode only, reading the reports to discover every service sending on the domain's behalf (the back-office, the CRM, the old site server), then with stricter rules. It is also a protection: anyone trying to send email pretending to be your domain gets blocked, a topic I come back to when talking about ",[128,129,131],"a",{"href":130},"\u002Fen\u002Ftips\u002Fhacked-wordpress-site-response-and-prevention","hacked WordPress sites",".",[11,134,135],{},"Another good rule is to separate flows: transactional email from one subdomain, campaigns from another. A newsletter with many complaints must not compromise the delivery of passwords and order confirmations.",[18,137,139],{"id":138},"other-tools-i-recommend","Other tools I recommend",[11,141,142],{},"Besides the ones I use every day, there are a few I recommend adding, especially on projects with a lot of email or a wide audience:",[99,144,145,151,157,167,173,179],{},[102,146,147,150],{},[36,148,149],{},"React Email",": the same component approach as MJML, but written in React, with a natural integration with Resend. Useful if the project is already in React or if you want templates with logic.",[102,152,153,156],{},[36,154,155],{},"Can I email",": the Can I use of email, it tells you which HTML and CSS properties each client supports.",[102,158,159,162,163,166],{},[36,160,161],{},"Litmus"," or ",[36,164,165],{},"Email on Acid",": real previews on dozens of clients and devices, dark mode included. Paid, but they save a lot of manual testing.",[102,168,169,172],{},[36,170,171],{},"mail-tester",": you send an email to a generated address and get a score with authentication, content and reputation issues.",[102,174,175,178],{},[36,176,177],{},"Google Postmaster Tools",": shows the domain's reputation with Gmail, spam rates and authentication errors. Worth turning on for any domain that sends regularly.",[102,180,181,184],{},[36,182,183],{},"A DMARC report reader",": reports arrive as XML, unreadable by hand; services such as dmarcian or Postmark DMARC turn them into a weekly digest.",[18,186,188],{"id":187},"my-take","My take",[11,190,191,192,196],{},"I treat email as part of the product, not as a detail to tidy up at the end. In my workflow the template starts in MJML and is versioned in Git, tests go through Mailpit locally, sending happens through an API with keys in environment variables, and every change is tried in a preview before going live, just as I do for the rest of the site with ",[128,193,195],{"href":194},"\u002Fen\u002Ftips\u002Fpublish-website-with-github-and-netlify","GitHub and Netlify",". The domain has SPF, DKIM and DMARC before the first email goes out, not after the first complaint.",[11,198,199,200,204],{},"It is also a matter of few dependencies: for transactional email a sending service with a good API is enough, not an all-in-one marketing platform. When a site leaves WordPress for a lighter architecture, as I describe in ",[128,201,203],{"href":202},"\u002Fen\u002Ftips\u002Fmigrate-wordpress-to-nuxt-github-netlify","from WordPress to Nuxt.js, GitHub and Netlify",", email is one of the things to rethink most carefully, because it was often handled by a plugin nobody remembered installing.",[18,206,208],{"id":207},"why-work-with-me","Why work with me",[11,210,211,212,216,217,221],{},"I have been building websites and applications since 1999, and I have watched email move from hand-written HTML to components, and from unauthenticated servers to signed, monitored domains. I can design the templates, connect sending to your back-office, e-commerce or CRM, set up SPF, DKIM and DMARC and work out why a message is not arriving. If your project has emails that end up in spam or that nobody has ever really tested, ",[128,213,215],{"href":214},"\u002Fen\u002Fcontact","get in touch"," or have a look at the ",[128,218,220],{"href":219},"\u002Fen\u002Fservices\u002Fapi-integrations","API integrations and automation"," service.",{"title":223,"searchDepth":224,"depth":224,"links":225},"",2,[226,227,228,229,230,231,232,233],{"id":20,"depth":224,"text":21},{"id":30,"depth":224,"text":31},{"id":58,"depth":224,"text":59},{"id":72,"depth":224,"text":73},{"id":93,"depth":224,"text":94},{"id":138,"depth":224,"text":139},{"id":187,"depth":224,"text":188},{"id":207,"depth":224,"text":208},"Software development",{"name":236,"url":237},"Philippe Murray-Pietsch","https:\u002F\u002Funsplash.com\u002F@pmpietsch","2026-10-28","A site's emails are part of the product: MJML for the code, Mailpit for testing, Resend for sending via API, and SPF, DKIM and DMARC to stay out of spam.","md",[242,245,248,251],{"q":243,"a":244},"What is the difference between transactional email and newsletters?","Transactional emails are triggered by an action of the user or the system: an order confirmation, a password reset, a form notification, a booking reminder. Newsletters and campaigns are sent in bulk to a list. It pays to keep them technically separate too, with different services or at least different subdomains, so that a campaign with many spam reports cannot hurt the delivery of service emails.",{"q":246,"a":247},"Do I really need SPF, DKIM and DMARC?","Yes. Without authentication, emails easily land in spam or get rejected, and the large mailbox providers now ask anyone who sends for at least SPF and DKIM, and DMARC for high-volume senders. They are DNS records: you set them up once and keep an eye on them over time through DMARC reports.",{"q":249,"a":250},"Why use MJML instead of writing the HTML by hand?","Because email HTML still relies on tables and inline styles, and every client interprets it in its own way. MJML lets you write readable components (sections, columns, buttons) and generates compatible HTML, already tested on the most common clients. The code stays maintainable and can be versioned like the rest of the project.",{"q":252,"a":253},"What is Mailpit for?","It is a fake SMTP server for development: the application sends it emails just as it would to a real service, but Mailpit holds them and shows them in a web interface. That way you can test flows, content and attachments without sending anything to real addresses.","\u002Fimages\u002Ftips\u002F2026-10-28-email-transazionali-strumenti.jpg","A row of colourful mailboxes next to a hedge","transactional email",{},true,"\u002Fen\u002Ftips\u002F2026-10-28-email-transazionali-strumenti",[261,262,263],"pubblicare-sito-con-github-e-netlify","sito-wordpress-hackerato","da-wordpress-a-nuxt-github-netlify",{"title":6,"description":239},"Transactional email: tools, testing and sending from code","integrazioni-api","transactional-email-web-development-tools","en\u002Ftips\u002F2026-10-28-email-transazionali-strumenti",[270,271,272,273,274],"email","resend","mjml","mailpit","deliverability","08eCo70jn0ZiwGJKZZk0wgYYr7-f61TEWu44UbtyN1I"]