Mailtrap
Last updated Nov 7th, 2025 | Page history | Improve this page | Report an issue
Support the team building MODX with a monthly donation.
The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.
Backers
Budget
$285 per month—let's make that $500!
Learn moreWhen working on your MODX site, it's useful to have a single platform to both test emails in development and send them reliably in production. One option for that is Mailtrap.
Mailtrap is an email platform for developer and product teams. It provides both an SMTP Service for sending transactional and bulk emails and an Email Sandbox for testing emails (free plan available for both).
Email Sandbox¶
Email Sandbox is a service that you can use to "trap" emails, without actually sending them to their intended recipient. Instead, they're shown to you in a user interface.
After creating an account, you can find the credentials in the Email Sandbox > Sandboxes > your sandbox.
In MODX, configure the following via System > System Settings:
-
mail_smtp_hosts: sandbox.smtp.mailtrap.io -
mail_smtp_port: 587 -
mail_smtp_userandmail_smtp_passare provided in the sandbox settings in Mailtrap. -
mail_smtp_prefix: tls
SMTP service¶
To send emails with Mailtrap's SMTP, the generic instructions apply, but here's how to configure Mailtrap specifically.
Setup and verify your sending domain¶
- In your Mailtrap account, navigate to Sending Domains and click Add Domain
- Enter the domain name you want to send from (you must have access to its DNS records)
- Add the provided DNS records to your domain provider
- Click Verify DNS Records once all records are added
- Wait for the automatic domain review to complete (usually takes a few minutes)
- Once verified, you'll see a Verified badge next to your domain
Important note: Some domains may require additional compliance checks. If selected, you'll be asked to fill out a simple compliance form.
Get your SMTP credentials¶
Once your domain is verified, navigate to Sending Domains, select your domain, and open the Integrations tab.
Click Integrate under Transactional Stream (for automated emails) or Bulk Stream (for marketing campaigns).
Toggle to SMTP to reveal your credentials.
In MODX, configure the following via System > System Settings:
-
mail_smtp_hosts: live.smtp.mailtrap.io -
mail_smtp_port: 587 -
mail_smtp_userandmail_smtp_passare provided in Mailtrap's Integration settings. -
mail_smtp_prefix: tls
Support the team building MODX with a monthly donation.
The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.
Backers
Budget
$285 per month—let's make that $500!
Learn more










