Commits on May 13, 2010
  1. Version bump to 2.2.1 for release

    committed May 13, 2010
  2. Fixing small typo

    committed May 13, 2010
Commits on May 11, 2010
Commits on May 7, 2010
  1. Handle multiple quoted words in Encodings.unquote_and_convert_to

    The function Encodings.unquote_and_convert_to isn't used anywhere in the
    current source tree, but it's necessary to correctly handle headers with
    non-ASCII, non-UTF-8 character sets under Ruby 1.8.
    For example, we can force the unquoting of the 'To' header as UTF-8 using
    the following code:
      to_field = mail.header['to']
      Mail::Encodings.unquote_and_convert_to(to_field.value, 'utf-8')
    This patch adds support for multiple quoted chunks in the same header.
    For example:
      To: =?Shift_JIS?Q?=93=FA=96{=8C=EA=?= <>, \
              =?Shift_JIS?Q?=93=FA=96{=8C=EA=?= <>
    All that was actually needed was a regular expression tweak to prevent
    the two quoted chunks from being matched as one giant, malformed chunk.
    Note that we still don't make any attempt to correctly deal with headers
    that mix different encodings in the same header.  I'm sure these exist
    somewhere in the wild, but I haven't seen them yet.
    Ideally, all this code should go away and be replaced with a more
    robust implementation of field.charset and field.decoded.
    emk committed with Apr 15, 2010
  2. Allow bundler to automatically build a gem directly from git

    Using bundler (now included with Rails 3.0), it's possible to fetch gems
    directly from specific branches in a git repository.  This is very handy
    for contributors and people who need to make small fixes.
    With this patch applied, it's possible to include the following line
    in a Gemfile:
      gem 'mail', :git => 'git://'
    Then you can install the latest master branch using bundler:
      bundle install
    This patch changes two things about the development process.  First,
    gems are now built using:
      rake build
      gem build mail.gemspec
    Second, the generated gemfile now appears in the top-level directory,
    and not in a pkg/ subdirectory.
    emk committed with Apr 15, 2010
Commits on Apr 28, 2010
  1. Fixed performance issues with decoding values containing encoded-word…

    …s... it scaled exponentially for long strings
    calvincorreli committed Apr 28, 2010
Commits on Apr 27, 2010
  1. Encode question marks in the encoded-word string

    Lars Pind committed Apr 27, 2010
Commits on Apr 26, 2010
  1. Redid the folding to make it much much faster for long strings (the o…

    …ld one really crumbled with headers longer than 100,000 characters, which I happen to use in my setup with Sendgrid's SMTPAPI).
    While I was at it, I decided to make it so that it would run longer stretches of encoded-words, and only one per line. The old implementation was really pessimistic in only taking at most 10 characters or up to the next white-space, encoding that (including all the overhead =?...?Q?...?=), and then repeating for the next 10-character stretch. This implementation tries to take as much as possible, given what it ends up looking like when it's encoded. The output is more compact and a lot prettier this way. Yay!
    This version also fixes all the previous issues with extra white-space and an extra = at the end of the encoded-words.
    calvincorreli committed Apr 26, 2010
Commits on Apr 25, 2010
  1. We need to make sure we don't have two encoded-words next to each oth…

    …er on the same line, as the white-space between them is going to be eaten up.
    calvincorreli committed Apr 25, 2010
Commits on Apr 24, 2010
  1. - Better to strip the white-space right away

    - Added a test case to expose the problem I was seeing
    calvincorreli committed Apr 24, 2010
  2. - Only subtract prepend/6, since in order to get to the 10 character …

    …number, we're counting each character as potentially 6 characters in output.
    - Remove leading horizontal whitespace before adding the remainder of @unfolded_line to @folded_line, since @unfolded_line will always end up starting with such a character, and otherwise it might be output double, if that part happens to be encoded-word-encoded
    - My earlier hack which involved simply switching to base64-encoding didn't work, either, so this is removed.
    - Ruby's pack("M") adds a trailing =\n to the string, which needs to be removed, otherwise we end up with an equal sign too many before the ending ?=, so it says =?= every time
    - Fixed all the specs to reflect the changes
    calvincorreli committed Apr 24, 2010
  3. This hack didn't work.

    calvincorreli committed Apr 24, 2010
Commits on Apr 17, 2010
Commits on Apr 11, 2010
  1. Updating readme

    committed Apr 11, 2010
  2. Updating change log

    committed Apr 11, 2010