While troubleshooting a bug report, I discovered that SmtpMailSystem::mail() is incorrectly parsing the Content-Type header.

Comments

pillarsdotnet’s picture

Status: Active » Needs review
StatusFileSize
new2.59 KB

This patch allows SMTP, HTML Mail, and Mail System to work together.

pillarsdotnet’s picture

Created a documentation page illustrating the use-case that makes the above patch necessary.

pillarsdotnet’s picture

Also, it would be lovely if the SMTP developers would contribute to the documentation here.

fabianx’s picture

Status: Needs review » Reviewed & tested by the community

Reviewed and tested, but the middle part of the patch will conflict with #1330714: Character encoding conflict between Drupal and phpmailer., which when applied will solve this issue more elegant.

Why this patch works:

Content-Type can be setup like "text/plain; foo/bar", but it can also be "text/plain;foo/bar". The space is not a must and such should not be accounted for.

The patch also improves the error message by saying, which header could not be analyzed. This will help in debugging.

Please apply.

franz’s picture

Status: Reviewed & tested by the community » Needs work
fabianx’s picture

Status: Needs work » Reviewed & tested by the community
StatusFileSize
new2.21 KB

Re-rolled patch by omitting middle part, which was solved in #1330714: Character encoding conflict between Drupal and phpmailer..

=> Back to RTBC

franz’s picture

Status: Reviewed & tested by the community » Fixed

Thank you for patches and tests. Committed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.