871 lines (648 sloc) 46.3 KB

Version 2.8.0 (unreleased)

Breaking changes:

  • Sendmail and exim delivery now raise DeliveryError when the command exits with a nonzero exitstatus. (benmmurphy, CoolElvis)

  • Sendmail and exim delivery :arguments option must be an array of string args. (benmmurphy)

  • Passing unparsed headers to is no longer supported. Use Mail::Field.parse. (jeremy)

  • Removed long-deprecated features: Message#register_for_delivery_notification, #has_transfer_encoding?, #add_transfer_encoding, #transfer_encoding, #message_content_type, #mime_parameters, #encode!, and Part#inline_content_id. (jeremy)


  • Handle a wide variety of non-RFC Message-ID formats. (peterkovacs)

  • Restore LF=>CRLF conversions for properly encoded non-binary emails. (rubys)

  • Gracefully parse invalid dates in Date and Received headers. (okkez)

  • Converting to multipart moves Content-* headers to the new part. (kirikak2)

  • Multipart Content-Type no longer includes a needless charset param. (kirikak2)


  • Speed up message encoding, especially with large attachments. (dalibor)

Version 2.7.0 (2017-10-31)


  • #1097 – SMTP security: prevent command injection via To/From addresses. (jeremy)


  • #647 – IMAP: specify IMAP server search charset with Mail.find(search_charset: 'UTF-8'). (yalab)

  • #650 - UTF-7 charset support. (johngrimes)

  • #664 - RSpec: with_html and with_text matchers. (zakkie)

  • #723 – IMAP: support `enable_starttls: true` for TLS upgrade on non-IMAPS/SSL servers. (doits)

  • #804 - Configurable SMTP open_timeout and read_timeout. (ankane)

  • #853 - `Mail::Message#set_sort_order` overrides the default message part sort order. (rafbm)

  • #856 - Added :logger delivery method. (zacholauson)

  • #900 - Support non-instance_eval builder API. Yield self to if the provided block takes any arguments. (taavo)

  • #1065 - Require STARTTLS using :enable_starttls. (bk2204)

  • #1002 - Transcoding replaces invalid chars with “�” instead of discarding them. (kjg)

  • #1053 - Ruby 2.4.0 compatibility. Fixnum+Bignum unified as Integer. (peterkovacs)

  • #1094 - Core extensions removal: Drop `String#at`, `from`, `last` and `is_utf8?` since they are no longer used by Mail internals. (metcalf)

  • #1095 - Core extensions removal: Drop `String#mb_chars`, `not_ascii_only?`, `constantize`, `first`, `to` to avoid monkey patching the standard library. (metcalf)

  • #1111 - Mail::Field.parse API which deprecates calling with unparsed header fields. (jeremy)

  • #1117 - Configurable POP3 read_timeout. (hspazio)


  • #1059 - Switch from mime-types to mini_mime for a much smaller memory footprint. (SamSaffron)

  • #1119 - Speed up large attachment encoding by memoizing slow ASCII-only checks. (dalibor)


  • #464 - Improve attachment filename detection by preferring Content-Disposition filename. (lawrencepit)

  • #535 - IMAP: fetch messages WITH IMAP FLAGS by passing a block with four args. (lawrencepit)

  • #558 - Parser: cope with unknown charsets in header fields by falling back to ASCII. (boesemar)

  • #655 - Sort attachments to the end of the parts list to work around email clients that may mistake a text attachment for the message body. (npickens)

  • #683 - SMTP: Work around Net::SMTP dot-stuffing bug with unterminated newlines on Ruby 1.8 and 1.9. (yyyc514)

  • #766 - No longer strip 'Subject: ' from legit subject lines. (grosser)

  • #982 – Faithfully preserve unfolded whitespace rather than collapsing to a single space. (jeremy)

  • #1103 – Support parsing UTF-8 headers. Implements RFC 6532. (jeremy)

  • #1106 – Limit message/rfc822 parts' transfer encoding per RFC 2046. (ahorek)

  • #1112 – Support Windows-1258 charset by parsing it as Windows-1252 in Ruby. (jeremy)

  • #1114 – Setting `mail.body = …` on a multipart message now adds a new text part instead of adding a raw MIME part. (jeremy)

  • #1159 – Parse emails with n newlines so long as they have no binary content. (jeremy)


  • #539 - Fix that whitespace-only continued headers would be incorrectly parsed as the break between headers and body. (ConradIrwin)

  • #605 - Fix Mail::Address#name for nil addresses (peterkovacs)

  • #684 - Fix recursively fetching attachments from an embedded message/rfc822 part whose Content-Type header has additional parameters. (vongruenigen)

  • #689 - Fix Exim delivery method broken by #477 in 2.5.4. (jethrogb)

  • #792 - Allow blank filenames in Content-Disposition field. (robinroestenburg)

  • #876 - Strip valid RFC-1342 separator characters between non-matching encoded-words. (Caleb W. Corliss)

  • #895 - Fix that Mail::Message#add_file was adding a stray filename header. (kirikak2)

  • #923 – Fix decoding nested quotes around non-US-ASCII addresses. (averell23)

  • #978 - Fix for invalid chars being left in a string for invalid b_value from encoding. (kjg)

  • #996 - Fix that multipart/mixed emails with a delivery-status part could be interpreted as bounces. (kjg)

  • #998 - Fix header parameter parsing (such as attachment names) for values encoded with a blank charset or language code. (kjg)

  • #1000 - Fix header parameter parsing (such as attachment names) to transcode to UTF-8 (kjg)

  • #1003 - Fix decoding some b encoded headers on specific rubies that don't account for lack of base64 padding (kjg)

  • #1020 - Don't set SMTP verify mode to nil when config was not provided. (jhass)

  • #1023 - Fix double-quoting in display names. (garethrees)

  • #1032 - Fix that comparing messages changed their raw Message-ID to their parsed message_id. (bobjflong)

  • #1074 - Fix that the first address in a list is dropped when a subsequent address has non-US-ASCII characters. (domininik)

  • #1107 - Fix Address#display_name and other formatting flip-flopping between encoded and decoded forms depending on whether #encoded or #decoded was called last. (jeremy)

  • #1110 - Fix that Mail::Multibyte::Chars#initialize mutated its argument by calling force_encoding on it. (jeremy)

  • #1122 – Fix that tilde (~) shouldn't be escaped for Exim delivery. (Benabik)

  • #1113 - Eliminate attachment corruption caused by CRLF conversion. (jeremy)

  • #1131 - Fix that Message#without_attachments! didn't parse the remaining parts. (jeremy)

  • #1019 - Fix b value encoder incorrectly splitting multibyte characters. (Kenneth-KT)

  • #1157 - Fix base64 attachment transfer encoding being overridden by quoted-printable. (dalibor)

Version 2.6.4 - Wed Mar 23 08:16 -0700 2016 Jeremy Daer <>


  • #772 - Normalize encoding matchers (grosser)

  • #775 - Avoid failed encodings / stop bad charsets early (grosser)

  • #782 – Make the gem compatible with Rubinius (robin850)

  • #865 - Allow a body with an invalid encoding to be round tripped (kjg)

  • #866 - Support decoding message bodies with non-Ruby-standard charsets (jeremy)

  • #868 - Use the Ruby19.charset_encoder when decoding message bodies (kjg)

  • #872 - Low-level option to include BCC field in the encoded message (grossadamm)

  • #901 - Allow mail.text_part = '…' and mail.html_part = '<p>…</p>' (taavo)

  • #924 - Matcher for having attachments (schepedw)


  • #956 - Use native String#encode for CR/LF conversion (carsonreinke)

  • #970 - Support Ruby 2.3+ frozen string literals (twalpole)


  • #719 - Fix to not extract header content that looks like its field name (kjg)

  • #789 - Fix encoding collapsing not dealing with multiple encodings in 1 line (grosser)

  • #808 - Mail::Field correctly responds_to? the methods of its instantiated field (thegcat)

  • #849 - Handle calling Part#inline? when the Content-Disposition field couldn't be parsed (kjg)

  • #874 – Stay under 1000-char SMTP line length limits (pushrax)

  • #877 - Make Mail::Field == other take the field value into account (kjg)

  • #907 - Mail::ContentDispositionField should work with nil value (kjg)

  • #910 - Mail::Address should handle b_value_encoded local and domain parts (kjg)

  • #918 - Account for possibility of absent delivery-status headers (kjg)

Version 2.6.3 - Mon Nov 3 23:53 +1100 2014 Mikel Lindsaar <>

  • #796 support uu encoding (grosser)

Version 2.6.2 (Unreleased) - Wed Oct 22 13:42 -0500 2014 Benjamin Fleischer <>


  • #681 - fewer hotspot object allocations (srawlins)

  • #815 - autoload parsers for load-time speed and memory usage (grosser)


  • #736 - copes with non-UTF8 messages marked as UTF8 (jeremy)

Version 2.6.1 - Sun Jun 8 15:34 +1100 2014 Mikel Lindsaar <>


  • Silence warnings on loading ragel-generated parsers (bf4)

Version 2.6.0 - Mon Jun 2 22:49 +1100 2014 Mikel Lindsaar <>


  • Allow interceptors and observers to be unregistered (zuhao)

  • Added feature to find the mail in uid (taketin)

  • Save settings passed to TestMailer#new (svanderbleek)

  • Allow the setting of envelope from directly (jeremy)

  • Accept other IETF/IANA-registered Content-Types and Content-Transfer-Encodings (jeremy)

  • Alias shift-jis charset to Shift_JIS Ruby encoding (jeremy)

  • Add support for ks_c_5601-1987 charset, aliased to CP949 Ruby encoding (jeremy)

  • Don't allow colons in header names (jeremy)

  • Can assign arrays of Message-IDs to References and In-Reply-To (jeremy)

  • Setting the html_ or text_part sets a default text/html or text/plain content type (jeremy)

  • Setting the html_ or text_part to nil removes it (jeremy)

  • Addresses without a parsable email or display name still format as their raw text (jeremy)

  • Close pull request 504 - Alias GB2312 charset to GB18030 Ruby encoding (bpot)

  • Close pull request 399 - Accept :ca_path and :ca_file options for SMTP delivery (ndbroadbent)

  • Close pull request 389 - Don't add superfluous message headers to MIME parts (djmaze, jeremy)


  • Migrate to RAGEL based parser, awesome work by (bpot)

  • Performance improvements for people parsing email headers (ConradIrwin)

  • Close pull request 488 - Speed up field construction & comparison (bpot)


  • Fix for when content looks like field name (kjg)

  • Don't change original when you change a copy (TylerRick)

  • Don't include separating semicolon in paramter value when sanitizing (bpot)

  • Fix fencepost encoding problem with binhex strings and only one token (drasch)

  • Fix sendmail delivery to addresses with a leading hyphen (lifo, jeremy)

  • Correctly format mbox From headers per RFC4155 (bpot, jeremy)

  • Fix bogus '=' at the end of some quoted-printable messages (jeremy)

  • Shouldn't be fooled into encoding strings on 1.8 by unrelated Encoding constant (emiellohr, jeremy)

  • Header encoding should be US-ASCII, not the default external encoding (jeremy)

  • Address elements should return decoded display names by default (jeremy)

  • Fix up tests that depend on utf-8 external encoding; read fixtures as binary (jeremy)

  • Capture stderr from Sendmail and Exim deliveries (jeremy)

  • RFC2822 quoted_string content may be empty (jeremy)

  • Calling #to_s on a field with a nil value returns an empty string instead of nil (jeremy)

  • The Received header may contain zero name/value pairs, qmail-style (jeremy)

  • Fix that setting an attachment with a :mime_type and :encoding would override the :encoding (jeremy)

  • Fix that declaring an html_part but no text_part would use multipart/alternative anyway (jeremy)

  • Close pull request 508 - Don't add an extra CRLF to MIME parts; split MIME parts on correct CRLF boundaries (Aalanar)

  • Close pull request 506 - Escape backslashes in quoted strings (ConradIrwin)

  • Close pull request 496 - Correctly handle quoted-printable line breaks (jeremy)

  • Close pull request 493 - Repair misencoded quoted-printable line breaks (jeremy)

  • Close pull request 487 - Extract comments from group email addresses (bpot)

  • Close pull request 481 - Correctly quote filename attributes (bpot)

  • Close pull request 480 - Support mixed encodings in a single header body (adamvaughan)

  • Close pull request 471 - Fix Ruby 1.8 build when UTF16/32 default to little-endian (kennyj)

Coping with third-party bugs:

  • Parse multipart boundary from Content-Type headers containing extra semicolons (jeremy)

  • Close pull request 389 - Only add Content-ID to inline attachments to appease Outlook (djmaze, jeremy)


  • Add development gem dependency on rdoc (jeremy)

  • Refresh Bundler dependencies & setup (jeremy)

  • Remove i18n dependency and last vestiges of activesupport dependency in specs (jeremy)

  • Clarify that Sender is a single address, not an address list (jeremy)

  • Add an MIT-LICENSE file to make licensing clear & obvious; update to 2013 (jeremy)

  • Close pull request 501 - Tighten up header/body whitespace splitting (ConradIrwin)

  • Close pull request 499 - Clean up some dead code (ConradIrwin)

  • Close pull request 489, 495 - Docs typos (JackDanger, francois)

  • Close pull request 485 - Be explicit about unsupported address parsing (bpot)

  • Close pull request 484 - Remove #tree specs in preparation for deprecation removal (bpot)

  • Close pull request 482 - Update address field specs to reflect to #initialize API (bpot)

  • Close pull request 475 - Shush warning on Object#blank? redefinition (amatsuda)

  • Close pull request 472 - Clean up UTF8/UTF-8 internals (kennyj)

Version 2.5.3 - Sun Dec 4 15:52:00 +1100 2012 Mikel Lindsaar <>

  • Close pull request 468 - Remove debug output to STDOUT (tadman)

  • Fix up spec warnings

  • Remove un needed require

  • Ensure spec_helper constants only defined once

  • Use stub against time instead of DateTime to avoid double redefinition error

Version 2.5.2 - Sun Nov 18 15:01:00 +1100 2012 Mikel Lindsaar <>

  • Removing double loading of treetop parsers to remove warnings

  • Making parsers auto compile on spec suite and load in production code to avoid error that caused yank of 2.5.0

  • Reapply pull request 443 - CC fields with semicolon are now parsed right (paulwittmann)

Version 2.5.1 - Sun Nov 18 14:01:00 +1100 2012 Mikel Lindsaar <>

  • Yanked 2.5.0

  • Reverted pull request 443 - CC fields with semicolon are now parsed right (paulwittmann)

Version 2.5.0 - Sun Nov 18 12:20:00 +1100 2012 Mikel Lindsaar <>


  • Close pull request 406 - Add Mail#eager_autoload! to load all autoloaded files on demand (bpot)

  • Close pull request 461 - Allow string as delivery_method (skyeagle, radar)

  • Close pull request 407 - Do not require Net::IMAP or Net::POP if they're already loaded (bpot)

  • Close pull request 400 - Raise exception if delivery values or from values are missing completely from an email that is getting delivered (dmathieu)

  • Close pull request 397 - Support dots in local part of the addresses (eac)

  • Close pull request 477 - Fixed handling content_type with superfluous spaces (ledermann)

  • Close pull request 451 - Ignore nil in addresses so things do not blow up when e.g. a user had no email (grosser)

  • Close pull request 362 - Enable TLS in Ruby 1.8 (kingargyle)

  • Close pull request 358 - Fix Mail::CommonAddress#value=, Mail::CommonAddress#<< and Mail::Encodings.encode_non_usascii (mrkn)

  • Close pull request 350 - Makes mail Header object ennumerable (ged)


  • Close pull request 369 - Mail::Header#charset is called pretty often during header parser work (bogdan)

  • Close pull request 368 - Improve existing code by moving some objects to contstant instead of constructing them over and over again. (bogdan)

  • Close pull request 366 - Headers parsing performance optimization (bogdan)

  • Close pull request 365 - Add maximum_amount of parsed headers configuration parameter (bogdan)


  • Close pull request 444 - Fix typo in spec (cczona)

  • Close pull request 439 - Fix Ruby 1.9 behaviour to match 1.8.7 behaviour on ignoring invalid or undefined characters (ochko)

  • Close pull request 430 - Unstructured field converts to string before calling encoding on it (brupm mikel)

  • Close pull request 424 - Use String#to_crlf instead of String#gsub (okkez)

  • Close pull request 429 - Fix an obvious bug in exim delivery_method (dskim)

  • Close pull request 425 - Remove Gemfile.lock from generated gem (kbackowski)

  • Close pull request 414 - Fix typo on “ignoring” (derwiki)

  • Close pull request 405 - Fix stack overflow (RegexpError) triggered by large emails with an envelope (bpot)

  • Close pull request 402 - Prevent InReplyTo, Keyword, References or ResentMessageId fields from generating lines longer than 998 chars (pplr)

  • Close pull request 391 - Fixed failed attachment parsing when file name in headers contains spaces and is not wrapped in quotes (danieltreacy)

  • Close pull request 385 - Fix Multibyte::Chars#upcase/downcase (technoweenie)

  • Close pull request 384 - copy dat unicode over from active support (technoweenie)

  • Close pull request 380 - Split strictly on MIME boundary lines (ConradIrwin)

  • Close pull request 277 - Fix specific email decoding failure example (yalab)

  • Close pull request 361 - Support 8bit encoding for ruby 1.9 (bogdan)

  • Close pull request 346 - Fix two bugs of TestRetriever (ermaker)

  • Close pull request 337 - Make the behavior of value_decode the same between Ruby 1.8 and Ruby 1.9. (kennyj)

  • Close pull request 336 - Fix more warning: possibly useless use of == in void context (kennyj)

  • Close pull request 293 - make charset and mime type more resliant to bad header values (kmeehl)

  • Fix failing spec Issue 453 on Ruby 1.9.3

  • Fix mail reading: don't raise invalid byte sequence in UTF-8 when reading non-UTF-8 emails (mreinsch)

  • Close pull request 353 - define NilClass#blank? only if not defined yet (amatsuda)

  • Close pull request 357 - Fixes #349 an inverted condition on imap open read_only (felixroeser)

  • Remove duplicated line feed from regexp

  • Remove unused variable

  • Updated IMAP documentation

  • Tweak publisher

Version 2.4.4 - Wed Mar 14 22:44:00 +1100 2012 Mikel Lindsaar <>

  • Fix security vulnerability allowing command line exploit when using file delivery method

Version 2.4.3 - Tue Mar 6 19:38:00 UTC 2012 Mikel Lindsaar <>

  • Fix security vulnerability allowing command line exploit when using exim or sendmail from the command line

  • Change Mail#deliver! to also inform the interceptors

  • Encodings.value_decode(str): Treat lines with mixed encoding correctly when the line ends with a plain text part.

Version 2.4.1 - Thu Jan 19 13:49:34 UTC 2012 Mikel Lindsaar <>

  • Fix non ascii character folding problems

  • Handle multipart mail in Mail::Message#to_yaml / #from_yaml

  • More warning fixes

  • Normalize the Parse Error class and messages

  • Fix for Mail::Encodings.unquote_and_convert not handling unquoted characters mixed in between quoted strings

  • Updated treetop to latest version, specs now run approximately 25-30% faster!

  • Version bump to 2.4.1 and gem release

Version 2.4.0 - Sun Jan 15 18:15:56 UTC 2011 Mikel Lindsaar <>

  • Speed up reading of messages by about 12x

  • Added Message#without_attachments! that removes all message's attachments

  • Added shoulda-style RSpec matchers

  • Added support for @ in display name

  • Added support for the :tls and :ssl options

  • Added UTF-16 and UTF-32 support

  • Added Exim as it's own delivery manager

  • Added Ruby 1.9.3 compatibility

  • Fix for Sendmail return-path escaping

  • Fix for alias for SJIS was changed from shift_jis to windows-31J in Ruby 1.9.3

  • Fix for undefined method 'constantize' error when no ActiveSupport loaded

  • Fix Mail::Field#== comparison

  • Fixed Regexp warning: character class has duplicated range

  • Fixed encoding non-latin names in addresses

  • Fixed issue with non-7bit attachment filenames

  • Now define String#blank? only if not defined yet

  • Decoding text parts using charset from Content-Type field

  • Per RFC 5322, do not accept emails with consecutive dots

  • Bunch of bug fixes from contributed pull requests

  • Travis CI setup and passing on 6 rubies

  • Upgrade RSpec to 2.8.0

  • Lots of warnings fixed

  • Version bump to 2.4.0 and gem release

Version 2.3.0 - Tue Apr 26 09:59:56 UTC 2011 Mikel Lindsaar <>

  • Remove ActiveSupport from the dependencies, load Active Support if present, or use internals if not

  • Created v2.2 branch for all 2.2 related commits

  • Update activesupport require to use inflector - closes #217

  • Version bump to 2.3 and gem release

Tue Apr 26 06:18:19 UTC 2011 Mikel Lindsaar <>

  • Fixed charset warning issue with multipart messages -

  • Version bump to 2.2.18 and gem release

Wed 20 Apr 2011 15:16:20 UTC Mikel Lindsaar <>

  •“Subject: foobar”, 'iso-2022-jp') does not set charset -

Tue Apr 19 00:20:54 UTC 2011 Mikel Lindsaar <>

  • Fixed an exception with nil in Reply-To and References field -

  • Version bump to 2.2.17 and gem release

Sat Apr 16 12:57:27 UTC 2011 Mikel Lindsaar <>

Wed 26 Jan 2011 02:23:09 UTC Mikel Lindsaar <>

  • Update addresses passed into sendmail to escape them (Andy Lindeman)

  • Version bump to 2.2.15 and gem release

Mon 3 Jan 2011 12:48:59 UTC Mikel Lindsaar <>

  • Update field_spec to handle encodings, closes issues 44 and 120 (Luis Lopez)

  • Version bump to 2.2.14 and gem release

Mon 3 Jan 2011 00:09:27 UTC Mikel Lindsaar <>

  • Use default IANA port on the IMAP retriever_method (Adrian Silva)

  • Updated README to reflect latest ruby versions we test against (mikel)

  • Only remove tlsconnect if it exists (mikel)

Thu 23 Dec 2010 09:15:58 UTC Mikel Lindsaar <>

  • Added backport fix for net/smtp bug (Aaron Patterson)

  • Changed “Mail#text_part” so that it does not return a plain text attachment (Anton Mironov)

  • Added in rescue blocks for badly formatted dates as well as encoding problems (Karl Baum)

  • Fixed warning errors of duplicated regular expressions (Kouhei Sutou)

  • Removed duplication from Regex's containing [wd]+ as w contains d (mikel)

  • Add authentication selection for imap retriever (Björn Albers)

  • Removing warning on @name not being initialized (mikel)

  • Version bump to 2.2.13 and gem release

Fri 10 Dec 2010 09:06:49 UTC Mikel Lindsaar <>

  • Fixing problems with multibyte filenamed attachment (amatsuda)

  • Providing IMAP uid and imap object as options to IMAP calls (dball)

  • Fixing filename for windows (mikel)

Sun Dec 5 02:24:55 UTC 2010 Mikel Lindsaar <>

  • Updating requirement on i18n to be more relaxed for now until we nuke ActiveSupport dependency (Mikel)

  • Version bump to 2.2.12 and gem release

Tue 30 Nov 2010 00:36:11 UTC Mikel Lindsaar <>

  • Allow address lists to handle and ignore empty addresses (Donald Ball)

  • Allow address lists to handle repeating strings of commas (Donald Ball)

  • Noting pending test for malformed folding whitespace (Donald Ball)

  • Adding spec to test error email for missing addresses in to header (Mikel)

  • Bumping i18n dependency to ~> 0.5.0

  • Version bump to 2.2.11 and gem release

Wed 17 Nov 2010 00:43:31 UTC Mikel Lindsaar <>

  • Added test retriever and updated documentation (Donald Ball)

  • Fix test suite to work in any timezone (Donald Ball)

  • Added dependency for tlsmail for Ruby 1.8.6 (Donald Ball)

  • Added new feature, replies for mail message

  • Fix references header to use CFWS instead of comma as the separator per RFC2822

  • Version Bum to 2.2.10 and pushed.

Mon Nov 15 13:04:41 UTC 2010 Mikel Lindsaar <>

  • Add find_and_delete convenience method for consistency with POP3, document delete_after_find option (Donald Ball)

  • Documenting the openssl_verify_mode setting (Donald Ball)

  • Added ruby-1.8.6 back into the list of tested platforms (Donald Ball)

  • Relax i18n dependency until we remove active support requirement

  • Version Bump to to include new i18n dependency

Tue Oct 26 07:14:36 UTC 2010 Mikel Lindsaar <>

  • Version Bump to 2.2.9 and tag

  • Updating Gemfile and gemspec to include i18n and sync dependency versions

  • Added work from Kendall Gifford closing issues #104, #107 and #117

  • Always encode mailbox names with UTF-7 (github: fasta)

Tue Oct 26 06:43:17 UTC 2010 Mikel Lindsaar <>

  • Added updates from Donald Ball (github: dball) to improve 1.8.6 support

  • Added patch from Ryan Bigg (github: ryanb) for #mark_for_delete

Thu Oct 7 15:44:31 UTC 2010 Mikel Lindsaar <>

  • Version Bump to 2.2.7

  • Release 2.2.7

Thu Oct 7 15:42:57 UTC 2010 Mikel Lindsaar <>

  • Added fix for Windows using 'rb' flags, thanks to Luis Lavena and dzhang for pointing it out

  • Fixed up Rakefile to require bundler to run specs and give more appropriate errors messages if this fails

Tue Sep 28 14:59:03 UTC 2010 Mikel Lindsaar <>

  • Merged POP3 delete support work from Michael Prendergast

  • Merged IMAP support work from Fabian Staubli

Mon Sep 13 02:31:21 UTC 2010 Mikel Lindsaar <>

  • Replace some missing documentation

  • Version bump to

Sat 11 Sep 2010 05:13:36 UTC Mikel Lindsaar <>

  • Fixed parsing an email with an empty In-Reply-To header (Reported by Eugene Pimenov)

  • Adding address spec for format emails

  • Version bump to 2.2.6

Sat Sep 11 01:56:59 UTC 2010 Mikel Lindsaar <>

  • Added new way to do versioning for rubygems

  • Added additional specs for Content-Disposition: inline which are not being encoded correctly - Shawn Pyle

  • Make sure Mail::Message#attachment? returns true/false - Simone Carletti

  • Replace hard-coded references to Mail with more generic self references to allow easier inheritance (closes #61) - Simone Carletti

  • Force encoding on Regexp for Ruby 1.9 to avoid encoding conflicts - Golubev Pavel

  • Added lazy evaluation to message body: body is not parsed until need. It greatly improves performance with big mails if you don't need to read the body (yet)

  • Added Mail.read_from_string as an explicit method (mcansky)

  • Fixed bounce detection for multipart reports that contain a human readable report status part

  • Closed Issue #65 found (incredibly) by quetz - major Kudos for bug hunting

  • Fixed missing trailing CRLF in content type field - Closes issue #57 - Kudos to Henry Flower for finding it

  • Version bump to

Sat Sep 11 01:32:13 UTC 2010 Mikel Lindsaar <>

  • Closed issue #58 - Content Type not parsing unless lower case.

  • Version bump to

Thu 17 Jun 2010 22:13:18 UTC Mikel Lindsaar <>

  • Added Mail::POP3.delete_all, including specs (Martijn Storck)

  • Lars Pind updates on header folding

  • Version bump to 2.2.5

Tue Jun 8 01:55:21 UTC 2010 Mikel Lindsaar <>

  • Added inline attachment support to mail (mikel)

Mon Jun 7 18:00:39 UTC 2010 Mikel Lindsaar <>

  • Updating versioning so we only have one source, VERSION.yml (mikel)

  • Changed activesupport dependency to 2.3.6 to fix #53, #64, and def #67. (Artem Titoulenko)

  • Fixing typo in break_down_to.rb. (mikel)

Mon Jun 7 18:07:16 UTC 2010 Mikel Lindsaar <>

  • fixing a typo when generating docs. (Andrew Bloom)

  • Changing rnt to rns throughout mail (mikel)

  • Handle multiple quoted words in Encodings.unquote_and_convert_to (Eric Kidd)

  • Ruby 1.9: mark source encoding so it's usable with -Ks, -Ke, etc (Jeremy Kemper)

  • Add #include? to mail body for convenience (Maxim Chernyak)

  • Use Mail::TestMailer.deliveries in README example (John Trupiano)

  • Allow bundler to automatically build a gem directly from git (Eric Kidd)

Sun Apr 11 07:49:15 UTC 2010 Mikel Lindsaar <>

  • Lots of updates on encoding and decoding of headers and unstructured fields. This is now a lot cleaner and nicer. Also more predictable.

  • Merged encoding branch back into head

  • Version bump to 2.2.0

  • Tagged 2.2.0

Sun Apr 4 06:41:46 UTC 2010 Mikel Lindsaar <>

  • Created non-ascii header auto encoding for address fields and unstructured fields

  • Changed default behaviour of mail, if you specify a charset, it will use that charset regardless of what is in the body. Previously, if the body was all US-ASCII, it would set the charset to US-ASCII in preference.

  • Many internal version jumps from => - unreleased development versions

Mon 29 Mar 2010 07:04:34 UTC Mikel Lindsaar <>

  • Version bump to

  • No longer depend on vendor'd treetop as treetop now has optional loading of parts of the library

  • Change treetop dependency to 1.4.5

Sun 28 Mar 2010 10:31:33 UTC Mikel Lindsaar <>

  • Version bump to

  • Fixed up preserve case in header fields when assigned from a message closes issue #46

Sun 28 Mar 2010 09:02:20 UTC Mikel Lindsaar <>

  • Version bump to

  • Fixed net/pop3.rb regression for Ruby 1.8.6

  • Merged in Jeremy Kemper's updates:

    • Bump vendored treetop to 1.4.4

    • Use Mikel's treetop for cucumber workaround

    • Use LOAD_PATH for spec_helper instead of relative requires

    • Force treetop from git so cucumber doesn't pull in old version

Sun Mar 28 07:01:07 UTC 2010 Mikel Lindsaar <>

  • Version bump to 2.1.5

  • Changed guess encoding to short circuit to binary if the mime type is unknown, should be safe

  • Renaming spec to match the file for attachment_lists.rb

  • Adding Message#decoded returns Message#body#decoded if the message is not multipart

Sun Mar 28 02:55:42 UTC 2010 Mikel Lindsaar <>

  • Version bump to 2.1.4

Sun Mar 28 00:26:27 UTC 2010 Mikel Lindsaar <>

  • Merged in Jeremy/treetop to vendored treetop

  • Merged in nathansobo/treetop to vendored treetop

  • Merged in pzbowen/mail into mail - Adds body auto encoding - awesome work

  • Fixed content-transfer-encoding parser to be more compliant per RFC, also now handles trailing semi-colons correctly

  • Fixed content-transfer-encoding parser to handle weird “from the wild” misspellings

  • Added message.errors, header.errors arrays, returns array of [field_name, value, error_object] for each field that failed to parse

  • Removed bundler require from Rakefile

Sun Mar 17 03:03:03 UTC 2010 Mikel Lindsaar <>

  • Keep header name case when failing to unstructured field

Wed Feb 24 09:14:56 UTC 2010 Mikel Lindsaar <>

  • Fixed multiaddress bounce messages crashing when calling .bounced? Now just take the first report and return that.

  • Closes issue 38 - final_recipient method give problem when one bounce email for multiple email ids

  • Fixing up TODO and Docs

Sun Mar 22 03:24:15 UTC 2010 Mikel Lindsaar <>

  • Version bump to 2.1.3

Thu Jan 28 00:25:02 UTC 2010 Mikel Lindsaar <>

  • Added TMM1's patch to not raise errors if a email is not multipart/report

  • Added html_part and text_part now return the first text/html or text/plain part they find. Order is from top to bottom of the email, all parts, flattened.

  • Cleaning up register_interceptor and register_observer including documentation

  • Renamed #register_for_delivery_notification to #register_observer

  • Renamed #register_for_delivery_interception to #register_interceptor

  • Adding spec to check for folding of non ASCII words that have been encoded

  • Updating Message#inspect to be a bit more friendly… it is for us mere mortals after all

  • Version bump to 2.1.2

Sun Jan 28 02:59:34 UTC 2010 Mikel Lindsaar <>

  • Removed old method of setting delivery_method

Mon Jan 25 11:36:13 UTC 2010 Mikel Lindsaar <>

  • Added ability for address fields to init on an array instead of just a string.

  • Version bump to 2.1.1

Mon Jan 25 10:36:33 UTC 2010 Mikel Lindsaar <>

  • Now passes a block to the delivery handler, which can just call yield if it want's Mail to just do it's normal delivery method

  • Moved Mail.deliveries into Mail::TestMailer.deliveries. Now only gets mail appended to it if you are sending with the :test delivery_method (only for testing)

  • Version bump to 2.1.0

Mon Jan 25 01:44:13 UTC 2010 Mikel Lindsaar <>

  • Change :deliver! to deliver a mail object, bypassing the :perform_deliveries and :raise_delivery_errors flags, also does not append the mail object to Mail.deliveries, thus the ! (dangerous). The intended use for :deliver! is for people wanting to have their own delivery_handler (like ActionMailer uses) to track and handle delivery failures.

  • Added :delivery_handler to Message. Allows you to pass an object that will be sent :deliver_mail(self) by the Mail::Message instance when it is sent :deliver and bypasses the usual delivery method.

  • Changed :perform_deliveries flag to be more consistent with it's name, mail will not append itself to the Mail.deliveries collection if :perform_deliveries is false

Sat Jan 23 23:49:50 UTC 2010 Mikel Lindsaar <>

  • Version bump to 2.0.5

  • Added :raise_delivery_errors to Mail::Message, if set to false will silently rescue all errors raised by the delivery methods, set to true by default

Sat Jan 23 23:28:42 UTC 2010 Mikel Lindsaar <>

  • Version bump to 2.0.4

  • Added :perform_deliveries to mail, will not actually call deliver on the delivery method if this is set to false, set to true by default.

  • Added @delivery_notification_observers to mail messages, you can register an observer with mail by calling mail.register_for_delivery_notification(observer) and then when mail is told to :deliver it will call your observer with observer.delivered_email(self). It will call your observer if it actually performed the delivery or not (that is, irregardless of the :perform_deliveries flag)

  • Added ability to overwrite the Mail.deliveries store with an object of your choice instead of just an array, this is a good way to find out if something actually got delivered as if :perform_deliveries is false, this collection will not get the mail message appended

Sat Jan 23 05:32:53 UTC 2010 Mikel Lindsaar <>

  • Version bump to 2.0.3

  • Made body.sort_parts! recursive, to do the entire body

  • Added ability to use << on the results returned by the various address fields, ie, << 'new@address' now works

  • Message now adds multipart/mixed as the content type if nothing is set and there are parts to the message

  • Added #display_names and #addrs to all address fields. #addrs returns the actual Mail::Address object for each address in the field.

  • Body should call to_s on given input… incase someone gave it an IO.readlines result (Array)


Thu Jan 21 05:27:17 UTC 2010 Mikel Lindsaar <>

  • Version bump to 2.0.2

  • Major change to attachments, add_file now only accepts {:filename => 'full/path/to/file.png'} or {:filename => 'file.png', :content => 'string of file content'} you can also now do mail.attachments ='path/to/file.png') which is nice too!

Fri Jan 15 09:20:51 UTC 2010 Mikel Lindsaar <>

  • Rewrote all network classes to not use singletons. Means different Mail::Message objects can have different delivery methods.

  • Added examples for how to send via GMail, MobileMe, Sendmail, File etc.

  • Version bump to 2.0.0 as Network API changed drastically, now not a singleton class.

  • Fixed that return-path should only return one address

Thu Jan 14 10:41:22 UTC 2010 Mikel Lindsaar <>

  • Version update to 1.6.0 - API change on mail.address_fields to always return arrays

  • Updated all message.address_field methods to always return arrays, so mail.from #=> [''] now, is least surprise

  • Updated handling of empty group lists so it didn't crash

Thu Jan 12 10:41:47 UTC 2010 Mikel Lindsaar <>

  • Version 1.5.3, handling invalid input on fields. Highly recommended update

  • Updated fields to always try parsing the given data (unless blank). This allows mail to catch invalid input and return UnstructuredFields. Makes mail a lot more resistant to invalid input.

Fri 8 Jan 2010 00:00:08 UTC Mikel Lindsaar <>

  • Version bump to 1.5.2

Fri 8 Jan 8:55:49 2010 +1100 Mikel Lindsaar <>

  • Updated Sendmail and SMTP delivery methods to use return-path if present

  • Fix up a lot of content-type parsing problems

  • Updating compat listing

  • Moving error emails into one directory

  • Moving error emails into one directory

  • Initializing @tls variable to remove warnings

  • Moved default corpus directory

  • Fixed up git ignore file

Thu 6 Jan 2010 23:59:29 UTC Mikel Lindsaar <>

  • Added compatibility list to Readme.rdoc

  • Fixing encoding of return path to be per RFC 2822, adding angle brackets around the addr_spec

  • Specs covering return path setting and preserving

Thu 5 Jan 2010 23:59:48 UTC Mikel Lindsaar <>

  • Moving the require for tlsmail for Ruby 1.8.6 into mail.rb

Sun Jan 3 00:08:06 UTC 2010 Mikel Lindsaar <>

  • Version bump to 1.5.0

  • Major API change in Message#field_name. This WILL break your applications that use Mail. Message#field_name now returns good, intelligent, default values. You can still access the field object by calling Message# or Message#.

Sat Jan 2 04:12:53 UTC 2010 Mikel Lindsaar <>

  • Message-ID, Content-ID, References et al, now return the default value of the message ID without the angle brackets, as per RFC 2822, “Semantically, the angle bracket characters are not part of the msg-id; the msg-id is what is contained between the two angle bracket characters.”

  • Message class now has getter and setter methods for all the supported field types explicitly. This allows us to return a “default” value for all fields.

  • All address fields, when called from Message#to or Message#from or the like, return either a string of the address spec ( if it is a single entry, or an array of address specs if there is more than one ['', '']

Mon 28 Dec 2009 01:21:52 UTC Mikel Lindsaar <>

  • Added sorting of parts, default is text/plain, then text/enriched and text/html. Access through Body#set_sort_order and Body#sort_parts! (called from Body#encode automatically)

  • Version bump to 1.4.2

Sun Dec 27 10:38:24 UTC 2009 Mikel Lindsaar <>

  • Updating treetop and mail to initialize uninitialized instance variables to nil

  • Version bump to 1.4.1

Sun Dec 27 09:51:27 UTC 2009 Mikel Lindsaar <>

  • Version bump to 1.4 because now :to_s calls :decoded for all fields and body while :to_s calls :encoded for Message and Header containers. Makes sense… really.

Sun Dec 27 07:30:02 UTC 2009 Mikel Lindsaar <>

  • Changed fields to default to :decoded on :to_s, all container objects retain :encoded as the default for :to_s

Thu Dec 17 06:35:05 UTC 2009 Mikel Lindsaar <>

  • Fixed parsing error 'Subject: =?ISO-8859-1?Q?Re=3A_ol=E1?=' (has a new line embedded)

Thu Dec 17 02:14:23 UTC 2009 Mikel Lindsaar <>

  • Version 1.3.4

  • Vendor'd treetop

Thu Dec 17 01:32:00 UTC 2009 Mikel Lindsaar <>

  • Version 1.3.3

  • Removed dependency on treetop, don't need it at runtime

Wed Dec 16 23:48:46 UTC 2009 Mikel Lindsaar <>

  • Version 1.3.2

  • Resolved Ruby 1.9.1-head not working because File.basename only accepts US-ASCII or 8Bit

Sun Dec 13 01:06:17 UTC 2009 Mikel Lindsaar <>

  • Version 1.3.1

  • Resolved Issue #18 - Wrong instance variable name

  • Resolved Issue #15 - Duplicate block call

Thu Dec 10 21:25:37 UTC 2009 Mikel Lindsaar <>

  • Resolved Issue #13 - replacing From field results in from field becoming optional field.

Thu 3 Dec 2009 00:52:12 UTC Mikel Lindsaar <>

  • Added POP upgrades from Nicolas Fouché

  • Added patch to handle multiple from lines in email from Luke Grimstrup

Mon Nov 23 23:34:22 UTC 2009 Mikel Lindsaar <>

  • Resolved Issue #12 - Wrong comment in smtp.rb

Mon Nov 23 22:35:50 UTC 2009 Mikel Lindsaar <>

  • Changed the way attachments are added so that it does not break depending on the order of the Hash passed in.

  • Version bump to 1.3.0 - Now works with Edge ActionMailer, MRI 1.8.6, 1.8.7, 1.9.1, all tests passing

Sun Nov 22 12:19:44 UTC 2009 Mikel Lindsaar <>

  • Added check on add_part to make sure if there is already a body, and if so, make a text_part of the body

  • Fixing up attachment adding and making sure multipart emails always have boundaries

  • Change Message#attachments to now recursively return all attachments in the email in an ordered flattened array

  • Added ability for Mail::Message to accept {:headers => {'custom-header' => 'value', 'another-custom-header' => 'value'}} as a param on init

  • Adding ability to Mail::Message to add a part via :part(params) with optional block

  • Fixed up QP encoding forcing underscores into everything with a space

  • Added ReturnPathField#address

  • Updating gem loads and active support loads

Sat Nov 21 12:52:46 UTC 2009 Mikel Lindsaar <>

  • Changed Mail::Encodings to clean it up, added in unquote_and_convert_to as well as refactor in this area

Thu Nov 19 04:16:10 UTC 2009 Mikel Lindsaar <>

  • Added sendmail support from (Simon Rozet)

  • Changed to bundler for gem dependancies and moved gem generation into rakefile (Simon Rozet)

  • Bumped to 1.2.6 for sendmail support

Wed Nov 18 04:26:21 UTC 2009 Mikel Lindsaar <>

  • Changed Encodings.param_encode(string) so it intelligently encodes and quotes needed items and leaves plain, no special char, US-ASCII alone unquoted.

Sat Nov 14 08:20:21 UTC 2009 Mikel Lindsaar <>

  • Resolved Issue #10 - empty/nil cc/bcc field causes exception (Mail::Field::ParseError)

Fri Nov 13 00:31:04 UTC 2009 Mikel Lindsaar <>

  • Hacked and mutilated the network section, made it easier to extend out with other delivery and retriever methods. API changed SLIGHTLY with this. Please check the readme

  • Resolved Issue #8 - Mail::SMTP now delivers to all mail.destinations

  • Version bump to 1.2.5

Thu Nov 12 02:58:01 UTC 2009 Mikel Lindsaar <>

  • Resolved Issue #5 - Message ID not handling multiple periods in left hand side

  • Resolved Issue #6 - Ordering of add_file and body items causes invalid emails

Tue Nov 10 08:15:14 UTC 2009 Mikel Lindsaar <>

  • Resolved Issue #5 - Message ID generation issue

  • Resolved Issue #7 - README add_file examples don't seem to work - Updated readme and rdoc in Message#add_file

Mon Nov 9 23:38:33 UTC 2009 Mikel Lindsaar <>

  • Added ability to create new email via a hash or hash-like object. <mikel>

  • Moved all of the Part init into the Message class. Part now just uses Message's init, also moved all the attachment related functions into Message. As Part is a subclass of message, you shouldn't see any interface changes here.

Fri Nov 6 22:52:10 UTC 2009 Mikel Lindsaar <>

  • a6ef2b4: Fixed Issue #4 - Can't call encoding on non existant content-transer-encoding header

Fri Nov 6 00:51:55 UTC 2009 Mikel Lindsaar <>

  • Handled unstructured field folding “blank” lines

  • Fixed error in header.rb that created fields into an array, instead of a FieldList, resulting in mail.encode returning a random sort order on the header.

  • Made unstructured fields attempt to decode their values on :decode

Thu Nov 5 04:45:31 UTC 2009 Mikel Lindsaar <>

  • 2acb70a: Closes Issue #1 - Handling badly formatted content-type fields <mikel>

Wed Nov 4 23:24:32 UTC 2009 Mikel Lindsaar <>

  • 2b5d608: Closes Issue #2 - Empty header field values not parsing <mikel>

  • Version bumb to 1.2.1

Wed Nov 4 12:54:43 UTC 2009 Mikel Lindsaar <>

  • Renamed Mail::Message.encode! to Mail::Message.ready_to_send!, deprecated :encode! <mikel>

  • Rewrote encoding and decoding methods on all classes. Adds a lot of boiler plate code, but allows us to be really precise in each field type that needs custom encoding. Now all encoding is done by the field_type itself. Need to follow through on the body. <mikel>

  • Bump version to 1.2.0 due to changes of :encoded, :decoded behaviour <mikel>

Tue Nov 3 00:59:45 UTC 2009 Mikel Lindsaar <>

  • Tested mail against entire Enron set (2.3gb) and the Trec 2005 set (0.5gb), ~ half a million emails without crashing <jlindley>

  • Some headers only can appear once, enforce during header parse assignment. <jlindley>

  • Convert empty bodies into empty arrays instead of nil. <jlindley>

  • Handle blank content dispositions. <jlindley>

  • Mention Trec 2005 Spam Corpus in readme <jlindley>

  • Add 'rake corpus:verify_all' to allow parse checks in bulk. <jlindley>

  • Added handling of multi value parameters, like filename*1*=“us-ascii'en'blah” filename*2=“bleh” <mikel>

  • Added dependency on ActiveSupport 2.3 or higher <mikel>

Sun Nov 1 12:00:00 UTC 2009 Mikel Lindsaar <>

  • handle OpenSSL::SSL::VERIFY_NONE returning 0 <jlindley>

  • doing { content_type [text, plain, { charset => UTF-8 }] } is now possible (content type accepts an array) <mikel>

Sat Oct 31 11:00:41 UTC 2009 Mikel Lindsaar <>

  • Fixed attachment handling, so mail can find attachment from a content-type,

content-disposition or content-location

  • Added content-location field and parser

  • Added message.has_attachments? for ActionMailer friendliness

  • Added attachment.original_filename for ActionMailer friendliness

Sat Oct 25 13:38:01 UTC 2009 Mikel Lindsaar <>

  • Birthday, Mail released as a gem… phew