Permalink
Commits on Sep 13, 2017
Commits on Sep 12, 2017
  1. Suppress `warning: ambiguous first argument; put parentheses or a spa…

    swamp09 committed with jeremy Sep 11, 2017
    …ce even after `/' operator`
Commits on Jul 6, 2017
  1. Header: clarify that newline conversion is raw_source= writer's respo…

    jeremy committed Jul 6, 2017
    …nsibility, not the constructor
  2. Fix that Message#without_attachments! didn't parse the remaining non-…

    jeremy committed Jul 6, 2017
    …attachment parts
    
    
    Fixes #1130. References #278. References #33.
Commits on Jun 1, 2017
  1. Speed up large attachment encoding by memoizing slow ASCII-only checks

    dalibor committed with jeremy Jun 1, 2017
    In my benchmarks I'm seeing from 15-20% speed improvement when building
    emails with a 40KB html part and 30-40% speed improvement when building
    emails with large attachments.
    
    Closes #1119
Commits on May 22, 2017
  1. Eliminate attachment corruption caused by line ending conversions

    jeremy committed May 22, 2017
    * Omit initial CRLF linefeed conversion since CRLF are required newline
      separators. We shouldn't need to convert bare CR or LF. Update our
      fixture emails to use CRLF throughout. Closes #609. Fixes #408.
    
    * Drop quoted-printable CRLF conversion. This was introduced to
      harmonize with Ruby's \n-based line endings. But this breaks Q-P
      encoding with binary data. It's not *meant* for binary data, but we
      don't yet take adequate measures to use base64 for these cases.
      Reverts #496. Fixes #1010.
    
    Closes #1113
  2. Setting `mail.body = …` on a multipart message now adds a new text pa…

    jeremy committed May 22, 2017
    …rt instead of adding a raw MIME part
    
    Fixes super-confusing API usage where you add an attachment, then set
    the body text, and end up parsing the body text as if it were a raw MIME
    part.
    
    Closes #1114. Fixes #811. Thanks to @Venousek for diagnosis!
  3. Parser: cope with unknown charsets in header fields by falling back t…

    Martin Boese committed with jeremy Jun 8, 2013
    …o ASCII
    
    
    Closes #558
  4. String encodings: pragmatic support for Windows-1258 charset

    jeremy committed May 22, 2017
    Use "best effort" charset mapper by default instead of "strict,"
    allowing us to parse:
    * Windows-1258 charset as Windows-1252 Ruby string encoding
    * ansi_x3.110-1983 charset as ISO-8859-1 Ruby string encoding
    
    True Windows-1258 handling is pending upstream Ruby support:
    https://bugs.ruby-lang.org/issues/7742
    
    Closes #1112
  5. Stop stripping header name prefixes from header values

    jeremy committed May 22, 2017
    Fixes mail with a legit "Subject: subject: foo" header. We'd split that
    into a subject field with a "subject: foo" value. When we instantiate
    the SubjectField and pass that value, we'd strip the leading "subject: "
    from it again! So we'd end up with a "foo" subject.
    
    This fixes the issue at the cost of some obscure backward compatibility.
    
    1. If you instantiate internal header fields directly, bypassing
    Mail::Field, then using them to parse raw headers will now fail.
    This will now be treated as a literal value:
    
        Mail::ToField.new('To: foo@example.com')
        # => Mail::Field::IncompleteParseError: Mail::AddressList can not parse |To: foo@example.com|: Only able to parse up to "To: foo@example.com"
    
    Instead, use Mail::Field.parse:
    
        Mail::Field.parse('To: foo@example.com')
        # => #<Mail::ToField …>
    
    2. If you parse fields by instantiating Mail::Field.new with a raw header,
    it'll now warn you with a deprecation error. That behavior will go away in
    Mail 2.8.0.
    
        Mail::Field.new('To: foo@example.com')
        # => Passing an unparsed header field to Mail::Field.new is deprecated and will be removed in Mail 2.8.0. Use Mail::Field.parse instead.
        # => #<Mail::Field 0x7fa401026910 @charset="utf-8" @name="To" @value="foo">
    
    Instead, use Mail::Field.parse:
    
        Mail::Field.parse('To: foo@example.com')
        # => #<Mail::ToField …>
    
    Thanks to @grosser for #766 ❤️
    
    Closes #1111
  6. Fix broken parsing when Active Support was loaded

    jeremy committed May 22, 2017
    Since #1095 moved from `String#mb_chars` to `Mail::Multibyte.mb_chars`,
    but `mail/multibyte` was only required if Active Support wasn't loaded.
    
    Now always requires Mail::Multibyte, sets proxy_class to AS::MB::Chars
    if available, and runs CI against both chars classes.
    
    Closes #1109. Fixes #1108.
  7. gitignore: dropped appraisal gemfiles in 634d911, so stop ignoring th…

    jeremy committed May 22, 2017
    …eir lockfiles
    
    [ci skip]
  8. CI: test against rbx-3

    jeremy committed May 22, 2017
Commits on May 17, 2017
  1. Exim: tweak expectations to clarify that we're invoking exim with exp…

    jeremy committed May 17, 2017
    …licitly nil destinations
  2. Fix Mail::Exim, forgotten in 4875bc2

    jethrogb committed with jeremy Mar 12, 2014
    The parameters of Mail::Sendmail.call changed in 4875bc2 but
    Mail::Exim was not changed accordingly.
    
    Fixes #689
  3. Fix that Address#display_name and others flip-flopped between encoded…

    jeremy committed May 17, 2017
    …/decoded formatting
    
    Due to using an @output_type ivar to pass state between formatting
    methods. Fixed by explictly passing as an argument.
    
    Fixes #960
  4. IMAP: fix delete_all regression, no mailbox selected

    jeremy committed May 17, 2017
    Introduced by a3a46fe
    
    Fixes #909
Commits on May 16, 2017
  1. Allow blank filenames in Content-Disposition field

    robinroestenburg committed with jeremy Sep 15, 2014
    Restores the behavior prior to b1b1796. As a side effect of correcting
    filename parsing, that commit caused blank Content-Disposition filename
    params to no longer be treated as the attachment name and, hence,
    not being considered an attachment at all.
    
    Fixed by checking for nil instead of blank params.
    
    Closes #792
  2. Limit message/rfc822 parts' transfer encoding per RFC 2046

    Pavel Rosický committed with jeremy May 16, 2017
    Attached eml files can't be opened in Thunderbird or Outlook if they're
    encoded as base64.
    
    RFC 2046: https://www.ietf.org/rfc/rfc2046.txt
    
    > It should be noted that, despite the use of the numbers "822", a
    > "message/rfc822" entity isn't restricted to material in strict
    > conformance to RFC822, nor are the semantics of "message/rfc822"
    > objects restricted to the semantics defined in RFC822. More
    > specifically, a "message/rfc822" message could well be a News article
    > or a MIME message.
    >
    > No encoding other than "7bit", "8bit", or "binary" is permitted for
    > the body of a "message/rfc822" entity. The message header fields are
    > always US-ASCII in any case, and data within the body can still be
    > encoded, in which case the Content-Transfer-Encoding header field in
    > the encapsulated message will reflect this. Non-US-ASCII text in the
    > headers of an encapsulated message can be specified using the
    > mechanisms described in RFC 2047.
    
    Closes #1106
  3. Allow reading body_encoding without passing nil

    fphilipe committed with jeremy Jul 6, 2016
    Anticipate deprecating the unused body_encoding method.
    
    Closes #1011