

Announcing mails_viewer - easiest way to test mails in Rails app - poshboytl
http://pragmaticly.github.com/mails_viewer/

======
yehanyin
Besides mails_viewer, there are several more choices such as mail_view,
letter_opener, mailcatcher and mailsafe. Checkout our blog
[http://blog.pragmatic.ly/announcing-mailsviewer-a-rails-
engi...](http://blog.pragmatic.ly/announcing-mailsviewer-a-rails-engine-to-
view) for more info. There is a link in the github page but I think it's not
clear, :)

~~~
mratzloff
Thanks for the list. I searched for these months ago and couldn't find much. I
ended up using <https://github.com/wireframe/email_preview>, but some of these
look pretty nice.

------
patio11
Nice.

I usually do this with a dummy controller rigged up to show them in the
browser and fire them at whitelisted test inboxes, but always nice to see more
ways people handle these challenges.

------
jbredeche
We've been using letter_opener (<https://github.com/ryanb/letter_opener>),
which handles the "preview" case very well (opens the rich text and plain
emails in separate browser tabs on send). Doesn't do the other stuff that
mails_viewer does, but a good lightweight alternative.

~~~
cmer
Another alternative is Mail Catcher which we've been using with much success.
<http://mailcatcher.me/>

------
swalberg
There seem to be a few different problems being solved by the suggestions in
the comments:

1\. I don't want to send out emails in dev mode. At all. (mailsafe) 2\. I want
an easier way of looking at the emails my server does send out (letter_opener,
mailcatcher, mails_viewer) 3\. I want to be able to preview an email without
having to do the action that triggers it (mail_view)

~~~
yehanyin
mails_viewer can do 1 and 2. The default usage will not send out emails at
all. But if you want, you can. So it's preview and conditional send.

mail_view requires you to write additional code. The pro is that you can
preview it lively without doing the action again. The con is that you have to
write the scenario for preview.

------
thibaut_barrere
Also useful (even for non Rails projects): <http://mocksmtpapp.com/>

------
bluepostit
I also love using Python's integrated SMTP server.

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

This will just spit out the raw email.

Edit: you need root permission to listen on port 25. Otherwise you can use a
different port > 1024.

~~~
yehanyin
Cool, :) So you start a smtpd to catch your mails and do the test. That's also
how MailCatcher(<http://mailcatcher.me>) works. If it's fine to start a smtpd,
it's a good choice too!

~~~
bluepostit
Didn't even think of searching for such application! It sure is great to be
able to have an inbox-like view.

------
lshevtsov
There's also Mailtrap <http://mailtrap.io/> that prevents test emails from
getting to real addresses, and collects them on a server where they could be
viewed by every member of the team.

------
janx
Good to see it got a maintainer. We use this gem together with postfix, all
mails goes to postfix will be redirected to the gem. Then we use this postfix
server for all our apps on staging, works pretty well.

------
mr_november
Nice. Is this closed source? Can you tell me what it adds on top of tomlion's
code? Don't see anything about that in the readme. Thanks

~~~
mikeevans
Doesn't look closed source, there's a link to the github repo at the top of
the page.

~~~
mr_november
So there is, thanks. Chrome on Android doesn't show the top div, which is odd.

------
xuzhe
Looks good.

I think it would be better if you also put the screenshot in your blog into
the README.md.

------
imwilsonxu
Nice, glad to see startups giving back to open source community.

------
knwang
Nice. very useful gem.

------
yuanyim
it works like charming, nice job!

------
huacnlee
Useful tool!

