WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 6 years ago

Last modified 6 years ago

#22492 closed defect (bug) (invalid)

Duplicate MIME-Version header

Reported by: ryderlewis Owned by:
Milestone: Priority: normal
Severity: minor Version: 3.4.2
Component: External Libraries Keywords:
Focuses: Cc:

Description

In certain cases, Wordpress sends emails containing two "MIME-Version" headers. This causes email rejections from some Amazon SES SMTP servers in particular.

To reliably reproduce, a default multisite install with BuddyPress can be used. When a user tries to register and create a website, the activation email contains this bug. Unfortunately I don't know how to reproduce this error with Wordpress itself, but I believe this bug is related to the Wordpress core. If any plugin happens to set a custom header of "MIME-Version" to an email message, Wordpress core is the culprit for the insertion of the duplicate mail header.

Patch attached to this report, it's a trivial fix. All the fix does is checks to see if "MIME-Version" was already included in custom mail headers, and if so, don't insert the duplicate header.

Attachments (1)

patchfile.txt (997 bytes) - added by ryderlewis 7 years ago.
class-phpmailer.php patch

Download all attachments as: .zip

Change History (7)

@ryderlewis
7 years ago

class-phpmailer.php patch

#1 @SergeyBiryukov
7 years ago

  • Component changed from Mail to External Libraries

#2 @bpetty
6 years ago

  • Cc bpetty added
  • Keywords reporter-feedback added

This sounds like a bug in BuddyPress for specifying a second MIME-Version header in the first place. This should only be the responsibility of library composing the email, meaning only PHPMailer should be adding this.

Besides that though, we would also need confirmation on this bug that the email in question was actually using class-phpmailer.php since it turns out that BuddyPress includes it's own version of PHPMailer (an older 2.0.4 version from bbPress/BackPress) too.

#3 follow-up: @nacin
6 years ago

I agree, this sounds like an issue in BuddyPress. Letting JJJ know.

#4 in reply to: ↑ 3 @johnjamesjacoby
6 years ago

Replying to nacin:

I agree, this sounds like an issue in BuddyPress. Letting JJJ know.

Thanks for the ping. Created #5186 on our end to investigate in the current (1.9) milestone.

#5 @r-a-y
6 years ago

  • Resolution set to invalid
  • Status changed from new to closed

Bug is indeed caused by BuddyPress and will be addressed in the next version release.

Thanks for the report, ryderlewis.

#6 @bpetty
6 years ago

  • Keywords reporter-feedback removed
  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.