Processing text/plain email

(Fletcher) #1

Gmail normally sends as multipart/alternative, but it can be configured to send only text/plain. Unfortunately, when I try this Discourse sends me an email titled “Email issue – No Content” with the following body:

We’re sorry, but your email message to ["(email here)"] (titled Testing text/plain from Gmail) didn’t work.

We couldn’t find any content in the email. Make sure that you wrote something at the top of the email - we can’t parse inline replies.
If you’re getting this and you did include content, try again in UTF-8 plain text (no HTML).

I verified by Bcc’ing to another address that the message is sent with headers:

Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Is that just me, or is text/plain handling actually broken? This was sent as a new topic, if that matters.

(Top-post only is also a little disappointing, but that’s a separate topic and probably done to death.)

Linebreaks in posts created via email in from Gmail
(Jeff Atwood) #2

Our email support requires the HTML payload. So turning it off will not work.

(Fletcher) #3

Thanks for the quick response.

Wouldn’t it make more sense to take the content and process it through your markdown interpreter rather than just throwing it out?

I got to this point by trying to deal with the fact that text/html email just gets merged into one big blobby paragraph, so I suppose if you were going to fix only one email-related bug I’d vote for this one.

(Jeff Atwood) #4

It is on the list of @techapj – now that we’re back, we can make more progress.

(Fletcher) #5

Good to hear. I suppose it would also make sense to either change that error message or add (re-add?) support for text/plain messages. (Preferably add support, of course!)

(Jeff Atwood) #6

Good point, changing that to

If you’re getting this and you did include content, try again with HTML content included in your email (not just plain text only).

Since I think we will be relying on HTML content in the mail for the forseeable future.

(Jeff Atwood) #7