Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Superflours headers added (Date, MIME-Version) to MIME part when created with Email::MIME->create() #16

Open
otuschhoff opened this issue Aug 22, 2014 · 2 comments

Comments

@otuschhoff
Copy link

Superflours headers added (Date, MIME-Version) to MIME part when created with Email::MIME->create().

Effects

  • breaks HTML parsing
  • makes those headers visible in plaintext-view

Tested in

  • Outlook 2007
  • Google Mail

Breaks Products

  • Bugzilla (4.4.5) - All sent E-Mails (Bugzilla/BugMail.pm:369-386)

Potential cause

  • Version: 1.926
  • File: Email/MIME.pm
  • Lines: 199-201
  $CREATOR->_add_to_header(\$header, Date => $CREATOR->_date_header)
    unless exists $headers{Date};
  $CREATOR->_add_to_header(\$header, 'MIME-Version' => '1.0',);

Example - Broken MIME

From: ...
To: ...
Subject: ...
Date: Fri, 22 Aug 2014 14:01:01 +0000
...
Content-Type: multipart/alternative; boundary="14087160611.664C9Fcf.28775";
 charset="UTF-8"
MIME-Version: 1.0


--14087160611.664C9Fcf.28775
Date: Fri, 22 Aug 2014 16:01:01 +0200

MIME-Version: 1.0

Content-Type: text/plain

...
--14087160611.664C9Fcf.28775
Date: Fri, 22 Aug 2014 16:01:01 +0200

MIME-Version: 1.0

Content-Type: text/html

Workaround

Comment out Lines 199-201 in Email/MIME.pm:

From: ...
To: ...
Subject: ...
Date: Fri, 22 Aug 2014 14:01:01 +0000
...
Content-Type: multipart/alternative; boundary="14087160611.664C9Fcf.28775";
 charset="UTF-8"
MIME-Version: 1.0


--14087178291.E665BBdEa.28858
Content-Type: text/plain


...
--14087178291.E665BBdEa.28858
Content-Type: text/html
@sogerc1
Copy link

sogerc1 commented Jan 28, 2015

I noticed this issue too. What I did was to unset them immediately after creation.
Also a a "Content-Transfer-Encoding" is added to multipart MIMEs which is also unnecessary.
But other times they are necessary so maybe there should be options to set them or not.

@theochino
Copy link

I take this has not been fixed by the maintainer?
Same problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants