Test If Application Sends Correct E-mails
Interesting question appeared today at wtr-general mailing list.
my application has sent an email to outlook. i want watir to open outlook, open the mail and get the mail data like from text and so on.
I also have to test my application to see if it sends correct e-mails. So I knew the answer.
You do not have to open Outlook to see your mail. You can read you e-mail from ruby.
- receive e-mail – Net::POP3
- send e-mail – Net::SMTP
- create (before sending) and parse e-mail (from file, after receiving) – TMailNet::POP3 and Net::SMTP are included in Ruby. TMail needs installation. I had a problem with TMail installation, and I contacted author. He recommended this procedure, and now it works.
ruby setup.rb config --without-ext
ruby setup.rb setup
ruby setup.rb install

Testing E-mail: Tools
Lately I have been testing e-mail functionality of one application. In the beginning I though that I would write two or three posts about that experience. Now I think there will be more, but not much more. I prefer more shorter articles that two or thr…
Željko Filipin’s Blog
30 Jan 07 at 5:35 pm
[...] have been using TMail for testing e-mail functionality of web application that I test for a long time. But, development of that library stopped at 2004. Today I found out that it is again in [...]
Željko Filipin’s Blog on Software Testing » TMail 1.1.0 Gem Released
31 Oct 07 at 9:03 am