Skip to content

removed MIME-Version, it gets duplicated#330

Open
sandropons wants to merge 1 commit intotlovett1:masterfrom
sandropons:sandropons-patch-duphead-mimever
Open

removed MIME-Version, it gets duplicated#330
sandropons wants to merge 1 commit intotlovett1:masterfrom
sandropons:sandropons-patch-duphead-mimever

Conversation

@sandropons
Copy link
Copy Markdown

it seems that Wordpress phpmailer already inserts MIME-Version in mail headers.
When "custom contact form" plugin sends the notification email, it adds the MIME-Version header and it gets duplicated.
Servers may not accept the mail, resulting the error: 554 Transaction failed: Duplicate header 'MIME-Version'.

it seems that Wordpress phpmailer already inserts MIME-Version in mail headers.
When "custom contact form" plugin sends the notification email, it adds the MIME-Version header and it gets duplicated.
Servers may not accept the mail, resulting the error: 554 Transaction failed: Duplicate header 'MIME-Version'.
@robbytx
Copy link
Copy Markdown

robbytx commented Nov 9, 2017

👍 I am encountering this same problem, sending through Amazon SES.

This seems to be a common problem for many Wordpress plugins, as a simple google search for "wordpress duplicate mime-version" shows.

@robbytx
Copy link
Copy Markdown

robbytx commented Nov 10, 2017

@tlovett1 is there any chance you would merge and release this in the near future?

PHPMailer in Wordpress Core clearly adds the same header (and appears to have done so for some time): https://github.com/WordPress/WordPress/blob/5eb452d15b4d99fcd19bc97dd53876547c7b2655/wp-includes/class-phpmailer.php#L2110

Also, the wp_mail docs have an example shown passing the Content-Type header without the MIME-Version header: https://developer.wordpress.org/reference/functions/wp_mail/#comment-348

Since the core wp_mail function always calls PHPMailer, this seems like a fairly straightforward change with a relatively low chance of regression. (Of course, I'm not a Wordpress plugin dev, so possibly I'm overlooking something.)

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

Successfully merging this pull request may close these issues.

2 participants