Page MenuHomePhabricator

Inbound email is wrapped when sent from Gmail
Closed, WontfixPublic

Description

Whenever I send inbound email to Phabricator, the contents of the email get wrapped, whereas in the original email I did not intentionally add any newlines. See Dear Google, please fix plain text emails in Gmail for further information.

Event Timeline

joshuaspence raised the priority of this task from to Needs Triage.
joshuaspence updated the task description. (Show Details)
joshuaspence added a project: Mail.
joshuaspence added a subscriber: joshuaspence.

PBR American Apparel selvage, banjo actually next level chia gentrify cronut authentic. Shabby chic ennui health goth Banksy Intelligentsia PBR. Wolf irony health goth pug lumbersexual High Life cliche, heirloom Neutra. Narwhal slow-carb retro, organic Brooklyn typewriter Portland. Quinoa kogi literally, cardigan paleo viral vinyl occupy photo booth sartorial Brooklyn semiotics Shoreditch wayfarers drinking vinegar. Pour-over VHS flexitarian paleo pickled. Messenger bag Blue Bottle Kickstarter narwhal, gluten-free kogi banh mi Bushwick Godard fanny pack quinoa synth skateboard occupy chambray.

Modulo that terminal quote, I conclude this is a problem with your client.

I am just sending this email in an attempt to reproduce this behavior.
Hopefully it reproduces on this install.

Lorem ipsum dolor sit amet, dico munere vis in, eum dolores indoctum ei. Ei
graeci labitur mel, pro eu omnis nostro imperdiet. Ut nisl sonet audire
usu, mutat perfecto ne eam, vim volumus blandit et. Semper salutandi pro et.

Hmm, interesting. I sent this from the Gmail app for Android.

joshuaspence renamed this task from Inbound email is wrapped to Inbound email is wrapped when sent from Android Gmail.Mar 6 2015, 11:13 PM

Testing from Gmail web client.

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
commodo consequat. Duis aute irure dolor in reprehenderit in voluptate
velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat
cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id
est laborum. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed
do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad
minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex
ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate
velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat
cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id
est laborum. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed
do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad
minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex
ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate
velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat
cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id
est laborum. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed
do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad
minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex
ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate
velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat
cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id
est laborum.

joshuaspence renamed this task from Inbound email is wrapped when sent from Android Gmail to Inbound email is wrapped when sent from Gmail.Mar 6 2015, 11:15 PM
joshuaspence updated the task description. (Show Details)

I really wish that we could fix this as it drives me insane to the point that I try not to send inbound emails to Phabricator. I don't, however, have any ideas on how to tackle this. Specifically, I don't see how we can differentiate automatic line breaks inserted by Gmail from intentional line breaks inserted by the user.

Would this be possible for #prioritization? I would work on it myself, but don't have any ideas for an appropriate fix.

I'm not sure there's anything we can really do about this. Gmail is applying a destructive transformation to outbound mail, and there is no inverse function we can apply to restore the original mail.

Specifically, there exist numerous cases where two different inputs to Gmail produce the same output, so we have lost information through the transformation and can not possibly restore the original message unambiguously in the general case.

We could try to detect the mail came from Gmail (or maybe more generally that it was not encoded with a linebreak-preserving encoding) and "unwrap" it, but we'll get this wrong some of the time. I would particularly expect us to get it significantly wrong for things like code blocks, although maybe the wrapped behavior is so bad already that this would still be an improvement and/or users only ever use mail to send human-readable messages.

There is also some discussion elsewhere of restyling comments to have a narrower width, which might work around this. A "creative" solution in this vein would be to render comments from email with a wrapped line-width in some sort of alternate UI that made them look nicer, although this doesn't feel like a great use of time to me.

Why is this behavior OK for all other email and not OK for email to Phabricator? Or is the mail you're sending really multi-part and you presume all other clients render the HTML version rather than the plain text version?

epriestley claimed this task.

I don't see anything we can do about Gmail's behavior here. Use a different client, or ask Google to improve Gmail's behavior.