I just pushed Mail 2.2.1. ActionMailer edge now depends on 2.2.1 as well.
gem install mail
Or in your Gemfile:
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 <firstname.lastname@example.org>)
* Mail now only returns one encoded-word per line (Lars Pind <email@example.com>)
* Fixed all the previous issues with extra white-space and an extra = at the end of the encoded-words. (Lars Pind <firstname.lastname@example.org>)
* Make sure we can handle decoding of very long strings efficiently (Lars Pind <email@example.com>)
* Handle setting of charset through = method, so we don't get the warning (Lars Pind <firstname.lastname@example.org>)
* Remove the trailing =\n that pack('M') adds (Lars Pind <email@example.com>)
* Handle multiple quoted words in Encodings.unquote_and_convert_to (Eric Kidd <firstname.lastname@example.org>)
* Ruby 1.9: mark source encoding so it's usable with -Ks, -Ke, etc (Jeremy Kemper <email@example.com>)
* Add #include? to mail body for convenience (Maxim Chernyak <firstname.lastname@example.org>)
* Use Mail::TestMailer.deliveries in README example (John Trupiano <email@example.com>)
* Allow bundler to automatically build a gem directly from git (Eric Kidd <firstname.lastname@example.org>)
* Added recursive parsing of attachments inside message/rfc822 parts (Ubiratan Pires Alberton <email@example.com>)
* Adding #inline_content_id for attachments and parts (mikel)
* Updating readme (mikel)