Check out who we are and our recent projects.

A new Ruby e-mail library: Mail

Posted: November 21st, 2009 | Author: tarsolya | Filed under: Previews | Tags: , , | No Comments »

Mail handling was always a bit of a nag in Ruby: you either used Net::SMTP or TMail or if you’ve been building stuff in Rails, you had ActionMailer. From these three options, ActionMailer is the most friendly and you could easily decouple it from the Rails stack to use it on your own, in Sinatra, for example.

That said, Mikel Lindsaar just released a new library, simply called Mail, which handles everything from mail generation to sending. A major point for me when selecting libraries for future use is full Ruby 1.9 compatibility. Mail has been built 100% Ruby 1.9 compatible, which means proper encoding handling throughout the entire library. It’s a relief, to be honest.

Some other features, you might like:

  • Ruby idioms, when working with mail. This makes it easy to pick up the pace.
  • Sending and receiving, Net::SMTP and Net::POP3 support
  • Attaching files are a breeze
  • Full spec coverage

Check out the code examples on the project’s page on GitHub or pay a visit to the mail-ruby Google Group.



Leave a Reply