News for hackers. Stuff that matters.
Re:Announcing mails_viewer - easiest way to test mails in Ra... by yehanyin on Thursday September 20, 2012 @11:54AM (#4549148)
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... for more info. There is a link in the github page but I think it's not clear, :)
Re:Announcing mails_viewer - easiest way to test mails in Ra... by mratzloff on Thursday September 20, 2012 @03:17PM (#4550198)
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.
Re:Announcing mails_viewer - easiest way to test mails in Ra... by patio11 on Thursday September 20, 2012 @11:43AM (#4549098)
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.

Re:Announcing mails_viewer - easiest way to test mails in Ra... by jbredeche on Thursday September 20, 2012 @11:44AM (#4549099)
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.
Re:Announcing mails_viewer - easiest way to test mails in Ra... by cmer on Thursday September 20, 2012 @11:47AM (#4549119)
Another alternative is Mail Catcher which we've been using with much success. http://mailcatcher.me/
Re:Announcing mails_viewer - easiest way to test mails in Ra... by swalberg on Thursday September 20, 2012 @12:03PM (#4549197)
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)

Re:Announcing mails_viewer - easiest way to test mails in Ra... by yehanyin on Thursday September 20, 2012 @12:07PM (#4549217)
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.

Re:Announcing mails_viewer - easiest way to test mails in Ra... by thibaut_barrere on Thursday September 20, 2012 @03:47PM (#4550329)
Also useful (even for non Rails projects): http://mocksmtpapp.com/
Re:Announcing mails_viewer - easiest way to test mails in Ra... by bluepostit on Thursday September 20, 2012 @12:05PM (#4549205)
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.

Re:Announcing mails_viewer - easiest way to test mails in Ra... by yehanyin on Thursday September 20, 2012 @12:09PM (#4549228)
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!
Re:Announcing mails_viewer - easiest way to test mails in Ra... by bluepostit on Thursday September 20, 2012 @12:19PM (#4549282)
Didn't even think of searching for such application! It sure is great to be able to have an inbox-like view.
Re:Announcing mails_viewer - easiest way to test mails in Ra... by lshevtsov on Thursday September 20, 2012 @03:14PM (#4550189)
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.
Re:Announcing mails_viewer - easiest way to test mails in Ra... by janx on Thursday September 20, 2012 @10:58PM (#4551991)
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.
Re:Announcing mails_viewer - easiest way to test mails in Ra... by mr_november on Thursday September 20, 2012 @11:31AM (#4549033)
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
Re:Announcing mails_viewer - easiest way to test mails in Ra... by yehanyin on Thursday September 20, 2012 @11:35AM (#4549051)
@mr_november Thanks for read. You can directly get the codes at the github. Tomlion is my former colleague and I worked with him on this project at the beginning. And now I'm the only maintainer and you can see the changes via the commits. But true it's better to write the changes in the README. Thanks.
Re:Announcing mails_viewer - easiest way to test mails in Ra... by mikeevans on Thursday September 20, 2012 @11:41AM (#4549087)
Doesn't look closed source, there's a link to the github repo at the top of the page.
Re:Announcing mails_viewer - easiest way to test mails in Ra... by mr_november on Thursday September 20, 2012 @02:50PM (#4550056)
So there is, thanks. Chrome on Android doesn't show the top div, which is odd.
Re:Announcing mails_viewer - easiest way to test mails in Ra... by xuzhe on Thursday September 20, 2012 @11:28AM (#4549014)
Looks good.

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

Re:Announcing mails_viewer - easiest way to test mails in Ra... by imwilsonxu on Thursday September 20, 2012 @09:28PM (#4551742)
Nice, glad to see startups giving back to open source community.
Re:Announcing mails_viewer - easiest way to test mails in Ra... by knwang on Thursday September 20, 2012 @01:56PM (#4549759)
Nice. very useful gem.
Re:Announcing mails_viewer - easiest way to test mails in Ra... by yuanyim on Thursday September 20, 2012 @11:40AM (#4549076)
it works like charming, nice job!
Re:Announcing mails_viewer - easiest way to test mails in Ra... by huacnlee on Thursday September 20, 2012 @12:12PM (#4549244)
Useful tool!