Magento's mail layer is a thin wrapper over Symfony Mailer and Zend/Laminas Mail. By default, it hands the message tosendmail on the application server. At enterprise volume — a Magento 2 store doing 50k orders a month sends roughly 400k transactional emails across order, shipment, invoice, refund, and customer account flows — that is a recipe for silent delivery failure.
The fix is not exotic. Route outbound through an authenticated SMTP relay, sign with DKIM on a branded domain, and run seed tests after every template deploy. The specifics for Magento 2 are worth nailing because the ecosystem of SMTP modules varies in quality.
Mageplaza SMTP or the official Adobe Commerce SMTP extension plus SendGrid / Postmark / SES. Authenticate the domain, separate transactional from newsletter IP pools, keep the Klaviyo or Mailchimp stream on its own subdomain.
Why the default path fails
- Local MTA: Adobe Commerce on self-hosted infrastructure almost always routes through Postfix or Sendmail on the web node. The web node's IP has no email reputation.
- No DKIM: without Postfix-side OpenDKIM or an SMTP relay, transactional mail goes out unsigned. Gmail and Yahoo bulk-sender rules (since 2024) require DKIM for any volume above 5k/day.
- Envelope leakage: the MAIL FROM ends up as
nobody@webnode-prod-01.yourcorp.internal. DMARC alignment fails instantly once you publish a DMARC record. - Queue limitations: Magento's async email queue (on by default in 2.3+) reduces transaction timing pressure but does not add retry intelligence at the MTA level.
SMTP modules for Magento 2
Three options dominate. Pick one and stick with it — do not run two SMTP modules simultaneously, they will fight over the mailer transport.
- Adobe Commerce native SMTP (Magento 2.4.6+): basic SMTP credentials in admin. Works. Minimal configuration, no per-transport routing.
- Mageplaza SMTP: free and paid tiers. Handles API-based relays (SendGrid API, Mailgun API) in addition to plain SMTP. Provides a log. Our recommendation for most stores.
- MagePal Transactional Email: splits transactional streams by template — send order confirmations via Postmark and customer account emails via SES. Useful for high-volume, high-complexity stores.
Example: Mageplaza SMTP with SendGrid API
# app/etc/env.php — credentials injected via deploy, not committed
return [
'mageplaza_smtp' => [
'enabled' => '1',
'host' => 'smtp.sendgrid.net',
'port' => '587',
'username' => 'apikey',
'password' => getenv('SENDGRID_API_KEY'),
'protocol' => 'tls',
'return_path_email' => 'bounce@yourstore.com',
],
];app/etc/env.php is in .gitignore by default. Keep it that way. Inject credentials at deploy time via your CI runner or secrets manager — AWS Secrets Manager, HashiCorp Vault, or a simple env var chain in the web tier.
DNS: SPF, DKIM, DMARC
Authenticate the sender domain for the relay you chose. Below is SendGrid — each relay has an equivalent set.
; apex SPF — merge, do not duplicate
yourstore.com. TXT "v=spf1 include:sendgrid.net include:_spf.google.com -all"
; DKIM CNAMEs from SendGrid onboarding
s1._domainkey.yourstore.com CNAME s1.domainkey.u1234567.wl.sendgrid.net.
s2._domainkey.yourstore.com CNAME s2.domainkey.u1234567.wl.sendgrid.net.
; custom return-path (bounce) subdomain
em.yourstore.com CNAME u1234567.wl.sendgrid.net.
; DMARC — tighten after 2-4 weeks of clean rua reports
_dmarc.yourstore.com TXT "v=DMARC1; p=quarantine; pct=25; rua=mailto:dmarc@yourstore.com; fo=1"Subdomain strategy
For stores running more than one email stream (transactional + newsletter + abandoned cart + review requests), use subdomains to isolate reputation. A common layout:
orders.yourstore.com— Magento transactional via Postmark or SES.news.yourstore.com— Klaviyo or Mailchimp campaigns.support.yourstore.com— Zendesk / Gorgias replies.- Apex
yourstore.com— Google Workspace only, never bulk.
Transactional templates
Adobe Commerce ships dozens of templates atapp/design/frontend/<theme>/email/. Review these specifically:
order/new.html— the top revenue email. Strip upsell blocks, keep under 100 KB, verify plain-text alternative renders.shipment/new.html— often the second-most opened email. Include tracking link prominently, avoid image maps.invoice/new.html— PDFs attached as base64 blow up message size and hurt placement. Link to a hosted PDF instead.customer/account_new.htmlandcustomer/password_reset_confirmation.html— these land on first touch. A failure here loses the account before it starts.
Monitoring at scale
- Postmaster Tools / SNDS: register the sender domain with Google Postmaster Tools and the sending IP range with Microsoft SNDS. Daily visibility.
- DMARC aggregate reports: ingest the daily rua XMLs into a DMARC analyzer (dmarcian, Postmark's free analyzer, or a self-hosted parsr).
- Seed testing on deploy: hook inbox-placement tests into your CI pipeline. Every template change should trigger a run across 20 providers.
- Complaint rate: keep complaints under 0.1% on any stream. Magento exposes unsubscribe for newsletters but not for transactional — customers will mark as spam instead.
Run an inbox placement test across 20+ mailboxes after each theme change. Catch layout regressions that push confirmations into Promotions before customers do.