Mail version 2.2.1

Hi all,

I just pushed Mail 2.2.1. ActionMailer edge now depends on 2.2.1 as well.

  gem install mail

Or in your Gemfile:

  gem "mail"

This release incorporates a bunch of code submissions from the Mail community, it was simply awesome to see so many great changes and updates from all the forks on github. I have pulled most of the changes and there are more awesome ones in the wings. All in all, 7 different coders contributed to this release!

Highlights of this release are updates from Lars Pind who got stuck into the encoding and decoding of header fields. The job he did has improved Mail's speed a lot in this area using some intelligent optimisation, but kudos to him. Eric Kidd also did a lot of work in this area and helped update the git repository so that you can now properly use it with bundler pointing at the git source. Thanks to all the other contributors as well!

The new gem is now on Rubygems.org.. it is backwards compatible with the only real change is that Mail will now encode whole lines of text instead of breaking it down to individual words and encoding them separately. This is a speed improvement and you probably won't notice this as the decoded results stay the same.

Changelog from 2.2.0 is:

* Fixed Ruby 1.8.6 and 1.9.x incompatibilities because we were using each_with_index and each_line * Redid the folding to make it much much faster for long strings (the old one really crumbled with headers longer than 100,000 characters (Lars Pind <lars@pinds.com>) * Mail now only returns one encoded-word per line (Lars Pind <lars@pinds.com>) * Fixed all the previous issues with extra white-space and an extra = at the end of the encoded-words. (Lars Pind <lars@pinds.com>) * Make sure we can handle decoding of very long strings efficiently (Lars Pind <lars@pinds.com>) * Handle setting of charset through = method, so we don't get the warning (Lars Pind <lars@pinds.com>) * Remove the trailing =\n that pack('M') adds (Lars Pind <lars@pinds.com>) * Handle multiple quoted words in Encodings.unquote_and_convert_to (Eric Kidd <git@randomhacks.net>) * Ruby 1.9: mark source encoding so it's usable with -Ks, -Ke, etc (Jeremy Kemper <jeremy@bitsweat.net>) * Add #include? to mail body for convenience (Maxim Chernyak <max@bitsonnet.com>) * Use Mail::TestMailer.deliveries in README example (John Trupiano <jtrupiano@gmail.com>) * Allow bundler to automatically build a gem directly from git (Eric Kidd <git@randomhacks.net>) * Added recursive parsing of attachments inside message/rfc822 parts (Ubiratan Pires Alberton <u.alberton@gmail.com>) * Adding #inline_content_id for attachments and parts (mikel) * Updating readme (mikel)

Enjoy!

Mikel Lindsaar http://rubyx.com/