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.
Open your inbox and click "Configuration" to find its exact values. The SMTP settings look like this:
| Host | smtp.mailsandbox.com |
| Port | 2525 |
| Username | ms_… (your inbox username) |
| Password | … (your inbox password) |
| Encryption | null |
The Configuration screen generates copy-paste config for your stack, with the inbox credentials already substituted.
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.