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 P. 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 P. [email protected])
  • Mail now only returns one encoded-word per line (Lars P.
    [email protected])
  • Fixed all the previous issues with extra white-space and an extra = at
    the end of the encoded-words. (Lars P. [email protected])
  • Make sure we can handle decoding of very long strings efficiently
    (Lars P. [email protected]id)
  • Handle setting of charset through []= method, so we don’t get the
    warning (Lars P. [email protected])
  • Remove the trailing =\n that pack(‘M’) adds (Lars P.
    [email protected])
  • Handle multiple quoted words in Encodings.unquote_and_convert_to (Eric
    Kidd [email protected])
  • Ruby 1.9: mark source encoding so it’s usable with -Ks, -Ke, etc
    (Jeremy K. [email protected])
  • Add #include? to mail body for convenience (Maxim Chernyak
    [email protected])
  • Use Mail::TestMailer.deliveries in README example (John T.
    [email protected])
  • Allow bundler to automatically build a gem directly from git (Eric
    Kidd [email protected])
  • Added recursive parsing of attachments inside message/rfc822 parts
    (Ubiratan Pires Alberton [email protected])
  • Adding #inline_content_id for attachments and parts (mikel)
  • Updating readme (mikel)

Enjoy!

Mikel L.
http://rubyx.com/
http://lindsaar.net/

Mikel L. wrote:

Hi all,

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

Excellent. Keep up the good work, and thanks for doing this!