Deploy Mini Mailer
Local SMTP to HTTP Proxy for Mailgun, Postmark, and MailerSend
Mini Mailer
Just deployed
Deploy and Host Mini Mailer on Railway
Mini Mailer is a simple SMTP server that forwards mail over HTTP to Mailgun, Postmark, or MailerSend. For use as an SMTP gateway to allow applications that use SMTP to send emails via an HTTP endpoint when outbound SMTP is restricted.
Mini Mailer does not currently support attachments and is designed to run on an internal network only (e.g. mini-mailer.railway.internal), as it does not use TLS.
About Hosting Mini Mailer
Mini Mailer is a simple serverless application that creates an SMTP server on ports 25, 2525, and 587, and a HTTP server on port 80 used for health checks. The SMTP server listens for incoming SMTP connections and forwards the email to the HTTP endpoint.
Mini Mailer requires no configuration or dependencies and will automatically detect the email service provider based on the API token used.
To send emails, configure your application to send email with:
- Host: your Mini Mailer host (e.g.
mini-mailer.railway.internal). - Port:
25,2525, or587. - Username: For Mailgun, this is the domain name (e.g.
mg.yourdomain.com). For Postmark and MailerSend, this is any username. - Password: Your email service provider's API key or token.
Common Use Cases
- Relaying SMTP traffic to HTTP endpoints
- Sending SMTP email when outbound SMTP is restricted
API Keys and Endpoints
Mailgun
Create a new Domain Sending Key for your domain. Use your domain (or any email address on the sending domain) as the SMTP username, and the API key as the SMTP password.
Internally, Mini Mailer will use the API endpoint https://api.mailgun.net/v3/{domain}/messages.mime to send emails.
Postmark
Create a new Server API Token for your server. Use any username as the SMTP username, and the API token as the SMTP password.
Internally, Mini Mailer will use the API endpoint https://api.postmarkapp.com/email to send emails.
MailerSend
Create a new API Token for your account. Use any username as the SMTP username, and the API token as the SMTP password.
Internally, Mini Mailer will use the API endpoint https://api.mailersend.com/v1/email to send emails.
Dependencies for Mini Mailer Hosting
One of the following email service providers:
- Mailgun
- Postmark
- MailerSend
Deployment Dependencies
Environment Variables:
PORT: Health check port (80)
Why Deploy Mini Mailer on Railway?
Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.
By deploying Mini Mailer on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.
Template Content
Mini Mailer
NuovarDev/MiniMailer