SMTP configuration
Point any application at a MailSandbox inbox over SMTP

SMTP is the universal way to send email into MailSandbox — it works with any language or framework. Point your application's mailer at an inbox's SMTP credentials and every message it sends is captured instead of delivered.

Connection settings

Open your inbox and click "Configuration" to find its exact values. The SMTP settings look like this:

Hostsmtp.mailsandbox.com
Port2525
Usernamems_… (your inbox username)
Password(your inbox password)
Encryptionnull
Credentials are per inbox
The host is the same for everyone, but the username and password are unique to each inbox. Always copy them from the inbox's Configuration screen.
Code samples

The Configuration screen generates copy-paste config for your stack, with the inbox credentials already substituted.

MailSandbox inbox configuration showing SMTP code samples for many frameworks
Ready-made snippets for Laravel, Node.js, Python, Ruby, Symfony, Java, C#, CakePHP and cURL.

Laravel

Add these lines to your .env file, using the credentials from your inbox:

MAIL_MAILER=smtp
MAIL_HOST=smtp.mailsandbox.com
MAIL_PORT=2525
MAIL_USERNAME=ms_your_inbox_username
MAIL_PASSWORD=your_inbox_password
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS="hello@example.com"

Other stacks

Any SMTP-capable library works — Nodemailer, smtplib, PHPMailer, Symfony Mailer, JavaMail and more. Point them at the host and port above and authenticate with your inbox username and password. The inbox Configuration screen has a ready-made example for each.

No TLS required
MailSandbox never sends your test email anywhere, so encryption is not required on the sandbox connection. Set encryption to null (or none) if your framework asks for it.