Detour - Easily test email deliverability using simple-to-use assertions against a real SMTP server

Detour is a utility for writing tests against a real SMTP server.

Rather than mocking/stubbing your SMTP client Detour allows you to send all email to an in-memory relay. Detour provides assertions that can be used to until test the deliverability of your emails.

Detour was inspired by Bypass. Kudos to that team.


Interesting however I have question - is using raw SMTP rather than some service like Mailgun or Sendgrid is that popular?

I can only answer for my team but we created this out of need. I imagine SMTP is a popular way of sending email considering it’s a standard and works across vendors. SMTP was around long before Mailgun, Sendgrid, etc.

Having said that I don’t really know though. I only know what we need.


SMTP is what we used across company. It’s certainly very much in use as that SMTP server sends mails in 5 digits each day.

Nice, but this is internally only or to the external receivers as well?