# Mail version 2.2.1

**URL:** <https://www.ruby-forum.com/t/mail-version-2-2-1/188525>\
**Category:** Ruby\
**Created:** [May 13, 2010, 11:57am UTC](https://www.ruby-forum.com/t/mail-version-2-2-1/188525 "2010-05-13T11:57:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mikel\_L](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/2bfe46/32.png) [@Mikel\_L](https://www.ruby-forum.com/u/Mikel_L)\
**Post date:** [May 13, 2010, 11:57am UTC](https://www.ruby-forum.com/t/mail-version-2-2-1/188525/1 "2010-05-13T11:57:14Z")

</div>

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

Enjoy!

Mikel L.  
[http://rubyx.com/](http://rubyx.com/)

> **[Mikel Lindsaar](https://lindsaar.net/)**
>
> Internet Home for Mikel Lindsaar

---

<div class="post-metadata">

**Author:** ![Mikel\_L](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/2bfe46/32.png) [@Mikel\_L](https://www.ruby-forum.com/u/Mikel_L)\
**Post date:** [May 13, 2010, 11:35pm UTC](https://www.ruby-forum.com/t/mail-version-2-2-1/188525/2 "2010-05-13T23:35:27Z")

</div>

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!
