Is there a way to prevent gmail from quoting entire replies?

I send emails to my users which have the same subject but contain different content aside from the header and footer. The header contains a logo, a “Part x of n” message, and an and is never hidden. The footer contains an , the same “Part x of n” text and some functional links (Next, Pause, Tweet) that I don”t want hidden.

Watching: Is there a way to prevent gmail from quoting entire replies?

I tried enclosing these in a
. I also tried adding &ts=timestamp to the links. The links are images, so then I created a symbolic link called image2.png pointing to image1.png and alternated these images. None of these worked.

Is there a simple solution that I haven”t thought of yet?

Here is some html:

names are really separated by, rather than just a comma.

This function does not do any checking for problems. We assume,in this case, that the input is always correct.

(Part 19 of about 74)

Original page: hereAnd here”s a screenshot:


I was able to solve this problem by appending a containing a unique invisible string to each line of my email”s footer. At first, I just added time() to each line, but some email clients interpret this as a phone number and convert the string into a URL. So, I pre/postpended a non-numeric character to the string and things seem to be working fine.

There must be a better way to do this though…

Readmore: How To Forward Zoho Mail Accounts To Gmail Manually, Zpress Wiki

See Also:  15 email deliverability best practices for gmail

After going crazy from Gmail breaking up my transactional emails into blocks and hiding repeating parts of it, I implemented a helper function inspired by SeanO”s answer in my meanie-mail-composer package to automate the addition of random strings for me.

This helper includes a hidden with a 5 character random string before every

tag by default.

Here”s the code snippet that does the trick (Node.js):

const crypto = require(“crypto”);//Helper to randomize HTML contentsfunction randomize(html, tag = “

“) { //Create a 5 char random string for email content to be unique const time = String(; const hash = crypto .createHash(“md5”) .update(time) .digest(“hex”) .substr(0, 5); //Create HTML string to replace with and regex const str = `${hash}${tag}`; const regex = new RegExp(tag, “g”); //Replace in HTML return html.replace(regex, str);}

No more broken up emails!

Improve this answer
answered Dec 16 “16 at 19:51


Adam ReisAdam Reis
3,2443636 silver badges2929 bronze badges
Add a comment |
This is the technique from the other answers but this is the exact line that I added to my rails email templates:

Just needs to go below the content that shouldn”t be hidden.

Improve this answer
answered Feb 26 “20 at 17:22


35533 silver badges1212 bronze badges
Add a comment |

Your Answer

Thanks for contributing an answer to Stack Overflow!

Please be sure to answer the question. Provide details and share your research!

But avoid

Asking for help, clarification, or responding to other answers.Making statements based on opinion; back them up with references or personal experience.

See Also:  Le mail burger

To learn more, see our tips on writing great answers.

Readmore: How To Add Image And Hyperlink To Gmail Signature In Gmail, Add Image To Gmail Signature From Google Drive

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Facebook
Sign up using Email and Password

Post as a guest

Email Required, but never shown

Post as a guest


Required, but never shown

Post Your Answer Discard

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you’re looking for? Browse other questions tagged html gmail hidden or ask your own question.

The Overflow Blog
Featured on Meta
Visit chat
How to prevent text in a table cell from wrapping
Div collapse after float css
jQuery fade in/out on mouseover?

how to set the size of the element same as that of browser in

Changing Hidden input with Href Javascript call
Passing variables from HTML to PHP without forms
Cannot display HTML string
AngularJS Thumbnails from JSON file would not load; how to display large image by clicking on thumbnail
PHP – How to handle ‘utf-16’, us-ascii encoded html string to save correctly in DomDocument?
Hot Network Questions more hot questions

Question feed
Subscribe to RSS
Question feed To subscribe to this RSS feed, copy and paste this URL into your RSS reader.

See Also:  Gmail web: weather based themes gone?

Stack Overflow
Stack Exchange Network
site design / logo © 2021 Stack Exchange Inc; user contributions licensed under cc by-sa. rev2021.9.2.40142
Stack Overflow works best with JavaScript enabled


Your privacy

By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy.

Categories: Mail

Leave a Reply

Your email address will not be published. Required fields are marked *