How to get rid of "Show trimmed content" in GMail HTML emails?

HtmlGmailHtml Email

Html Problem Overview


I send a lot of HTML emails. The problem with GMail is, if there are more than one emails with the same subject, it hides some similar content and shows a "..." to show the "trimmed content". This screws up with my formatting.

If changing the subject is not an option, is there is any way to avoid this behaviour?

Edit: I should clarify that I programmatically send emails using Amazon SES from a php script. That is why I posted the question in Stack Overflow.

Html Solutions


Solution 1 - Html

I've just encountered this problem myself, and from my investigations it seems that GMail does indeed trim the content if it is similar to the preceding emails.

My solution is simply to insert the current time stamp at the end of every email:

> [15:02:21 29/01/2013] End of message.

Solution 2 - Html

To prevent this in HTML emails I'm adding two invisible unique elements: in the beginning and at the end of the mail. Like this:

...

<body>
<!-- this ensures Gmail doesn't trim the email -->
<span style="opacity: 0"> {{ randomness }} </span>

...

<!-- this ensures Gmail doesn't trim the email -->
<span style="opacity: 0"> {{ randomness }} </span>
</body>

{{ randomness }} is being replaced by my templating engine with the value of Date.now() (I'm using node.js, could be anything producing unique output)

Solution 3 - Html

Voilà! Finally after long testing I have found a solution to this problem.

What Gmail does is it puts in the "Show Trimmed Content" option if the message is similar to previous ones, or the subject of the email appears as it is in the content of the email.

To avoid this, simply try inserting any randomly generated string inside your mail which will make your email messages different and will not let Gmail insert the Show Trimmed Content option.

Solution 4 - Html

If you cannot change your subject you can surely go for the optimization of HTML mailers.

  1. Because HTML file size allowed by Gmail is 102kb. If Gmail finds that your HTML file size is above 102kb then it will show message clipped at the bottom of your HTML mailer. File size is regardless of the image size which are included in the mailers(I am considering image link here).

  2. If there are many white spaces and carriage return in your HTML file. So best option is to inline your CSS using mail chimps inline CSS tool and then compressing your HTML file (Then are numerous HTML compressors available online). This 2 tricks should surely work in order to avoid your email has been clipped message.

For more reference can visit this link.

Solution 5 - Html

Settings --> General --> Conversation View --> Conversation View off

This will basically not group the emails plus won't trim the contents.

Solution 6 - Html

Inserting one or two random characters below your signature seems to confuse gmail enough to leave content untrimmed but also makes me look like a drunk crazy person. This issue needs to be resolved if google wants people to take gmail seriously. I would like the option to integrate more google products but flubs like this which should be no brainers make it difficult to commit.

Solution 7 - Html

In addition to the other answers, be aware that messages over 102K in size are likely to be trimmed. Watch out for bloated CSS or inlined images contributing to a file size that's too large.

Edit: Some sources of this information for the curious-

Solution 8 - Html

I think this would be best option to avoid the "Hide expanded content Gmail" and prevent the content be stripped.

There are two ways to do it.

  1. Just add a random number at the end of your email
  2. Just adding bookmarklet to your bookmark toolbar and just click when you are going to compose an email

For more details please follow the below link

Refference

Solution 9 - Html

Gmail does this if the mail content is the same if the receiver has the same content from the same address. Therefore you should be generating some random ID, or make changes inside your HTML dynamically. Also, if you put random ID inside your content with hidden type will be ignored hidden type.

Solution: while generating HTML with python, I have decided to put today's date.

import datetime
datetime.datetime.now().strftime("%d %B %Y, %H:%M:%S %p")

13 August 2020, 20:29:15 PM

Solution 10 - Html

There are some workarounds in this thread:

http://productforums.google.com/forum/#!topic/gmail/yoAlDr3PyN4

Workarounds seem to be lame though. I hope you have a second name.....

> I just remember that there was one recommendation, to use a different > name in your signature. > > If your name is Jim, try using Melvin, or Horatio. That should prevent > the trimming, but it's not guaranteed.

Solution 11 - Html

Just insert any unique content after the trimmed contents. That can be anything. Even you can make it invisible by adding it in very light color, like light gray.

Solution 12 - Html

Just delete the little bars right above your gmail signature that separate your message from the signature.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionMunimView Question on Stackoverflow
Solution 1 - HtmldougwoodrowView Answer on Stackoverflow
Solution 2 - HtmlTroggyView Answer on Stackoverflow
Solution 3 - HtmlSarthakView Answer on Stackoverflow
Solution 4 - HtmlAnkita.PView Answer on Stackoverflow
Solution 5 - HtmlVickyView Answer on Stackoverflow
Solution 6 - HtmlsttdvsView Answer on Stackoverflow
Solution 7 - HtmlZootView Answer on Stackoverflow
Solution 8 - Htmldush88cView Answer on Stackoverflow
Solution 9 - HtmlSabuhi ShukurovView Answer on Stackoverflow
Solution 10 - HtmlVictoria RuizView Answer on Stackoverflow
Solution 11 - HtmlJoel JamesView Answer on Stackoverflow
Solution 12 - HtmljosephView Answer on Stackoverflow