Over aggressive Gmail eliding

Yesterday one of our users got an incoming email rejection, with the error that their body was too short. The email html Gmail had produced was like the following:

<div dir="ltr">
  Hi Team,
  <div class="gmail_quote">
    <div dir="ltr">
      <div><br></div>
      <div>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum tincidunt ullamcorper erat, non porttitor diam suscipit porttitor. Fusce viverra ipsum id vulputate tristique.</div>

      ...

    </div>
</div><br clear="all"><br></div>

Which Discourse parsed into this Markdown:

Hi Team

Omitting, of course, the real content of the message.

The issue is the email receiver makes the assumption that any element with a class prefixed with gmail_ can be thrown away (aside from gmail_default):

https://github.com/discourse/discourse/blob/master/lib/email/receiver.rb#L315-L320

Unfortunately it doesn’t seem like Gmail makes things quite so simple.

@zogstrip I can PM you the original email if you’d like

5 Likes

@zogstrip will be absent until July 1, 2018 so you will need to have some patience

5 Likes

Gosh, I hate when they do that :angry:

Any chances you could PM me the HTML version of that message? I’d like to see what’s in the quote.

4 Likes

It’s now fixed :email:

https://github.com/discourse/discourse/commit/8a53941fe06b6cf65d83926ac2f29df398b83733

6 Likes

This topic was automatically closed after 21 hours. New replies are no longer allowed.