Filipin.eu

Željko Filipin's blog.
Home Blog Tags License

View on GitHub
12 October 2006

Test If Application Sends Correct E-mails

by Željko Filipin

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) - TMail

Net::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

tags: TODO