Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Only use multipart/mixed when both a plain text and HTML body are given #6

@porjo

Description

@porjo

My email client, Thunderbird, has the option of viewing a HTML message as plain text. For messages that don't include a separate plain text part, Thunderbird performs some kind of auto-conversion to strip the HTML markup. I imagine other email clients would offer the same feature.

I've found that this doesn't work for email generated by Gophermail where only BodyHTML has been defined. The following is from one such email:

...
Mime-Version: 1.0
Content-Type: multipart/mixed;
 boundary=0acfc1a3bb97d32953b7758c3db581947e8cbcfe4cddb12eeb0daef24608
Status: RO

--0acfc1a3bb97d32953b7758c3db581947e8cbcfe4cddb12eeb0daef24608
Content-Type: multipart/alternative;
 boundary=9f5d8d4299aaef05e05bb84d27ee8017f5f7b4968c7b7e307a1e7f98259a

--9f5d8d4299aaef05e05bb84d27ee8017f5f7b4968c7b7e307a1e7f98259a
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: base64
...

I assume the reason that Thunderbird displays a blank messages is that it is simply honouring the blank multipart/alternative part.

Wouldn't it make more sense where Body or BodyHTML has not been defined, to not create the message as multipart/mixed?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions