Reading mails when testing with Chimp

We’re using Chimp to test, and we need to read the mails our server is sending.

One way I can think of is not setting MAIL_URL, overloading console.log, putting the console output in a collection, and reading it there.

Not too bad, but I’m thinking someone must have done something smart at some point? Can’t find anything though…

Set up your test recipients as email addresses you own (address+xx@domain.com is good way to use a single address as multiple recipients) and then use a service like http://mailin.io/ to close the loop.

Try this

:wink:

Edit: Might be a bit dated, but should do the trick with some tinkering. It basically overrides the Email.send and creates an endpoint that allows you to inspect what was sent using it.

Perfect and straight forward! Thanks.

I want to keep the actual mail sending out of the loop - that is not what I’m testing.

…and also, end to end testing is slow enough already without having to wait for mails to be received :slight_smile: