Download & Extend

The Content-Type header is incorrectly parsed in SmtpMailSystem::mail() function.

Project:SMTP Authentication Support
Version:7.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

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

Comments

#1

Status:active» needs review

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

AttachmentSize
content-type-parsing-1199966-1.patch 2.59 KB

#2

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

#3

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

#4

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.

#5

Status:reviewed & tested by the community» needs work

Could someone re-roll after the fix on #1330714: Character encoding conflict between Drupal and phpmailer. ?

#6

Status:needs work» reviewed & tested by the community

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

=> Back to RTBC

AttachmentSize
content-type-parsing-1199966-6.patch 2.21 KB

#7

Status:reviewed & tested by the community» fixed

Thank you for patches and tests. Committed.

#8

Status:fixed» closed (fixed)

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