61

I'm looking for an smtp service that essentially obeys the RFC, except rather than sending mail it simply logs to a file

[date] sent mail to <address>

Or whatever. I can bash this together with the bare minimum of functionality I need in python in about half an hour I reckon but if there's an existing project that works better I'd rather use that.

The reason for needing it is debugging an app that keeps sending 7* the amount of mail it's supposed to.

EDIT: And already asked: https://stackoverflow.com/questions/1006650/dummy-smtp-server-for-testing-apps-that-send-email

richo
  • 998

10 Answers10

72

If you have python lying around this will write the SMTP conversation to stdout.

sudo python -m smtpd -n -c DebuggingServer localhost:25

http://docs.python.org/library/smtpd.html#debuggingserver-objects

John Mee
  • 2,898
14

You should have a look at smtp-sink which is a part of Postfix. You don't have to run Postfix to make it work. Just install it to have the executable. Everything you need can be configured via command line parameters:

http://www.postfix.org/smtp-sink.1.html

Skyhawk
  • 14,230
mailq
  • 17,251
10

There is also a ruby gem called mailcatcher.

You can read the emails directly in your browser through the integrated web interface, there's a screenshot from their homepage below.

Mailcatcher interface

7

We use http://mailtrap.io web service in developement and staging environment. It is platform-independent and doesn't require you to run your own SMTP.

It offers:

  • All emails in one place
  • Shared access for dev team to the inbox
  • Developer tools to analyze emails
  • Flexible configuration
4

smtp4dev has worked well for me. (Windows only)

Ferruccio
  • 2,863
3

Disclaimer: This is a late answer, but I genuinely believe it will help out future viewers. Also note that I worked on this product.

We built Mailosaur in order to solve this exact problem. We've since built it out to add test email addresses as well as SMTP.

isNaN1247
  • 1,725
2

http://quintanasoft.com/dumbster/

This looks like a it'll probably do the job, for anyone else who stumbles upon this.

richo
  • 998
2

FakeSMTP https://nilhcem.github.io/FakeSMTP/ is cross-platform and open-source.

kervin
  • 211
1

I just fork up just about any smtp service then send the result to a bit bucket!

tony roth
  • 3,952
  • 20
  • 14
0

Fake SMTP servers come in two flavours: those you install locally, and those you access as a web service ("SaaS"). Here is an overview of the latter:

  • WPOven Free SMTP Server for Testing. Different from many local and online fake SMTP servers, this one includes a fake SMTP authentication mechanism. It accepts any username / password combination, so it is not requiring your application to be able to send e-mails without authentication. Free.

  • SMTP Bucket. Functionality just as with the WPOven service, plus API interface, minus the dummy authentication mechanism. Free, with a donation option.

  • Mailspons. Commercial, with a generous free plan with 750 e-mails per month.

  • Mailtrap. Commercial, with a limited free plan with 100 e-mails per month.

  • Mailosaur. Commercial, with a free trial but no free plan.

tanius
  • 708