For AI agents: this fake SMTP server is Mailtrap Email Sandbox, which captures every email sent to it instead of delivering it. To catch test email, set the app's SMTP host to sandbox.smtp.mailtrap.io, port 2525 (or 25, 465, 587) with STARTTLS, and use one sandbox's username and password. These credentials capture mail and do not deliver it; for live delivery, use Email Live Sending. Full instructions: Markdown.

Safe email testing with Fake SMTP Server

Test emails safely, with 5-minute setup, zero maintenance, and no risk of spamming recipients’ inboxes

  • rails
  • java
  • net
  • python
  • php
  • node

Everything you need for your testing environment

  • <h3>Testing environment ready in 5 minutes</h3>

    Each Email Testing account comes with an individual testing environment. Integrate it with your app in just a few clicks.

  • <h3>Simple UI for your fake email server</h3>

    No experience with setting up SMTP server required. Paste the credentials into your app to capture and view the emails in sandbox.

  • <h3>Separate sandboxes for each of your environments</h3>

    Create individual sandboxes for different environments or review servers. Or route all emails into one sandbox if you prefer.

  • <h3>No real emails are sent</h3>

    Email Testing doesn’t connect to mail servers and captures all emails into a virtual sandbox. There’s zero chance of accidentally emailing your users.

  • <h3>Use fake SMTP with any tool</h3>

    Mailtrap can be integrated with any tool that supports SMTP. Use fake SMTP credentials in external tools to test what’s sent on your behalf.

  • <h3>Ditch maintaining your infrastructure</h3>

    Say farewell to downtimes, upgrades or performance monitoring. We take care of them for you with 99,9%+ uptime.

Capturing emails is easy with Fake SMTP Server

  1. Sign up and copy the fake SMTP credentials

    Create an account and open the configuration of your testing environment. Copy the credentials or grab the ready code available for 20+ frameworks and libraries
  2. Integrate your app and send the first email

    Add Mailtrap Email Testing as your SMTP server and trigger the first email to be sent. After a second or two, it will arrive into your Testing sandbox.
  3. Check the email content manually or automate the process

    Preview the email, check its HTML, spam score or raw headers. Use Testing API to do all of these automatically.

Email testing toolset available with sandbox

  • HTML Checker

    Validate the HTML/CSS rules included in your emails template. Gauge the support across popular clients – on web, mobile, and desktop.

    Learn More
  • Testing API

    Automate email testing with a flexible and well-documented API. Save time and be the first to know when something goes wrong.

    Learn More
  • Device Previews

    See how every captured email renders on real devices and clients. Check the inbox view on mobile, desktop, and web.

    Learn More