SendEmail A/T reactor broken for recent version of Encode::MIME::Header

Bug #1801163 reported by Galen Charlton on 2018-11-01
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Jeff Godin

Bug Description

The approach introduced in commit d88e3624ea4 (see bug 1031335) to MIME-encode headers does not work when using recent versions of Encode::MIME::Header. Specifically, Encode::MIME::Header 2.22 or later, which is part of Encode 2.83 or later, adopts a much stricter view of its task and does not work for structured header fields like To or From.

In particular, older versions of Encode::MIME::Header would yield results like this:

From: stuff <email address hidden>

while newer version give you something like

From: =?UTF-8?B?c3R1ZmYgPGZvb0BiYXIuY29t?=

Email::Send chokes on the latter when it tries to determine the sender address to use for the SMTP transaction.

Since the maintainers of Encode::MIME::Header are unwilling (see to make it handle structured headers in a more "bug-compatible" fashion, we'll need to do something else. Email::MIME or Email::Stuffer both look promising.

Marking this high importance because it's evident that there's at least one case where an innocent upgrade of Encode results in breaking outgoing A/T email.

Evergreen 3.1+

Jason Stephenson (jstephenson) wrote :

I want to point out related bug 1466502, and bug 1362260 which took the approach of installing Email::Send from CPAN.

Perhaps an alternate solution is to finally switch to Email::Sender?

Galen Charlton (gmc) wrote :

I think the issues are orthogonal, as at first glance Email::Sender still needs something like Email::MIME to generate a correctly formatted (and escaped) email to send.

Jason Stephenson (jstephenson) wrote :

OK, Galen, I see you point after reading through the Github issue.

I want to add that it looks like this issue will affect Ubuntu 18.04 support. I'm willing to work on this at the Hack-A-Way next week. My Ubuntu 18.04 VM has Encode version 2.88 and Perl 5.26.

Galen Charlton (gmc) wrote :

Thanks! It occurs to me that dealing with Email::Sender at or around the same would be a good idea; if we end up adding a dependency on Email::MIME or Email::Stuffer, we may as well stack up other dependency changes.

Changed in evergreen:
assignee: nobody → Jason Stephenson (jstephenson)
Changed in evergreen:
status: New → In Progress
Changed in evergreen:
milestone: none → 3.3-beta1
Jason Stephenson (jstephenson) wrote :

I have pushed a branch to the working repository that resolves this issue in my testing (see the commit message for a test procedure).;a=shortlog;h=refs/heads/user/dyrcona/lp1801163-email-mime

Since this branch adds prerequisites, I hesitate to say this should be backported to 3.2 or earlier releases.

Changed in evergreen:
status: In Progress → Confirmed
assignee: Jason Stephenson (jstephenson) → nobody
tags: added: pullrequest
Jeff Godin (jgodin) on 2019-02-08
Changed in evergreen:
assignee: nobody → Jeff Godin (jgodin)
Changed in evergreen:
milestone: 3.3-beta1 → 3.3-rc
Changed in evergreen:
milestone: 3.3-rc → 3.3.1
Changed in evergreen:
milestone: 3.3.1 → 3.3.2
Changed in evergreen:
milestone: 3.3.2 → 3.3.3
Changed in evergreen:
milestone: 3.3.3 → 3.3.4
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers