June 3, 2016, 12:37pm
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 (
firstname.lastname@example.org is good way to use a single address as multiple recipients) and then use a service like http://mailin.io/ to close the loop.
June 6, 2016, 3:58am
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.
June 6, 2016, 8:21am
Perfect and straight forward! Thanks.
June 6, 2016, 8:24am
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