Content-type can optionally have a return in it and often does:

Content-Type: multipart/alternative;
	boundary="----=_NextPart_000_000B_01CD9A85.2A6D33A0"

However, this results in SMTP rejecting the content type as unknown because it breaks after the ';' only with a following space.

The result of this behavior is described in the htmlmail issue #1339276: Cannot get HTML mail with SMTP Authentication and Mail MIME modules enabled - a message that says "The Content-Type of your message is not supported by PHPMailer and will be sent as text/plain instead"

It's a simple fix; patch attached.

CommentFileSizeAuthor
smtp.content-type-should-handle-return.patch541 bytesrfay

Comments

wundo’s picture

Status: Needs review » Fixed

Looks good for me, committed.

rfay’s picture

Now that's what they call responsive! Wow. Thanks :-)

rfay’s picture

I note that this was committed for 7.x-1.x also, in case anybody runs across it. Will be in the dev version when the dev rerolls (every 12 hours)

wundo’s picture

Status: Fixed » Patch (to be ported)

Actually it wasn't but I will work on it latter.

rfay’s picture

Actually, looks like #1199966: The Content-Type header is incorrectly parsed in SmtpMailSystem::mail() function. dealt with this same thing (not as well IMO), but it may work correctly in D7.

asrob’s picture

Issue summary: View changes
Status: Patch (to be ported) » Closed (outdated)

I would close because Drupal 6 has reached EOL (https://www.drupal.org/drupal-6-eol).