# Over aggressive Gmail eliding

**URL:** https://meta.discourse.org/t/over-aggressive-gmail-eliding/90853
**Category:** Bug
**Created:** [June 27, 2018, 10:11am UTC](https://meta.discourse.org/t/over-aggressive-gmail-eliding/90853 "2018-06-27T10:11:05Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![LeoMcA](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/leomca/32/87233_2.png) [@LeoMcA](https://meta.discourse.org/u/LeoMcA)
#### Post date: [June 27, 2018, 10:11am UTC](https://meta.discourse.org/t/over-aggressive-gmail-eliding/90853/1 "2018-06-27T10:11:06Z")

</div>

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:

```plaintext
<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:

```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/main/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

---

<div class="post-metadata">

### Author: ![dax](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dax/32/244677_2.png) [@dax](https://meta.discourse.org/u/dax)
#### Post date: [June 27, 2018, 11:30am UTC](https://meta.discourse.org/t/over-aggressive-gmail-eliding/90853/2 "2018-06-27T11:30:15Z")

</div>

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

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [July 4, 2018, 4:23pm UTC](https://meta.discourse.org/t/over-aggressive-gmail-eliding/90853/4 "2018-07-04T16:23:22Z")

</div>

> [@LeoMcA](#):
>
> Unfortunately it doesn’t seem like Gmail makes things quite so simple.

Gosh, I hate when they do that 😠

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

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [July 4, 2018, 6:05pm UTC](https://meta.discourse.org/t/over-aggressive-gmail-eliding/90853/5 "2018-07-04T18:05:27Z")

</div>

It’s now fixed 📧

[https://github.com/discourse/discourse/commit/8a53941fe06b6cf65d83926ac2f29df398b83733](https://github.com/discourse/discourse/commit/8a53941fe06b6cf65d83926ac2f29df398b83733)

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [July 5, 2018, 4:00pm UTC](https://meta.discourse.org/t/over-aggressive-gmail-eliding/90853/6 "2018-07-05T16:00:01Z")

</div>

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