Jump to main content Jump to doc navigation

Mailtrap is a service (free plan available) 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.

When working on a development site, it's useful to configure emails to use such a service to prevent accidentally sending test emails to actual customers.

After creating an account, you can find the credentials in the inbox settings.

In MODX, configure the following via System > System Settings:

  • mail_smtp_hosts: smtp.mailtrap.io
  • mail_smtp_port: 587
  • mail_smtp_user and mail_smtp_pass are provided in the inbox settings in mailtrap.
  • mail_smtp_prefix: tls

Also see the generic instructions for sending email with SMTP for further activation and testing instructions

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.


  • modmore
  • Jens Wittmann – Gestaltung & Entwicklung
  • Fabian Christen
  • Digital Penguin
  • Dannevang Digital
  • Sepia River Studios
  • Chris Fickling
  • CrewMark
  • deJaya
  • Following Sea
  • Anton Tarasov
  • eydolan
  • Raffy
  • Lefthandmedia
  • Murray Wood
  • Snow Creative
  • Nick Clark
  • Helen
  • JT Skaggs
  • krisznet
  • YJ
  • Yanni
  • Richard


$367 per month—let's make that $500!

Learn more