有没有什么技巧可以阻止 Gmail 的“引用文本”?隐藏我的电子邮件页脚?
我向我的用户发送电子邮件,这些电子邮件具有相同的主题,但除页眉和页脚外还包含不同的内容。标头包含徽标、“Part x of n”消息和
并且从不隐藏。页脚包含一个
、相同的“Part x of n”文本和一些我不想隐藏的功能链接(下一步、暂停、推文)。
我尝试将它们包含在
中。我还尝试将 &ts=timestamp
添加到链接中。这些链接是图像,因此我创建了一个名为 image2.png 的符号链接,指向 image1.png 并交替这些图像。这些都不起作用。有没有我还没有想到的简单解决方案?
这是一些 html:
names are really separated by, rather than just a comma.</p>
<p>This function does not do any checking for problems. We assume,
in this case, that the input is always correct.</p>
</div>
</div>
<div>
<p>All that remains now is putting the pieces together.</div></div></div></div></span>
<hr>(Part 19 of about 74)<br>
<a href='http://www.mywebapp.com/index.php?action=next'>
<img border=0 src='http://www.mywebapp.com/images/next.png' alt='Get next text'</a>
<a href='http://www.mywebapp.com/index.php?action=pause&listid=252&itemid=2100'>
<img border=0 src='http://www.mywebapp.com/images/pause.png' alt='Pause this text'></a>
<a href='http://twitter.com/home?status=tweetGoesHere'><img border=0 src='http://www.mywebapp.com/images/twitter-a.png' alt='Tweet this'/></a><br>
Original page: <a href='http://eloquentjavascript.net/print.html'>here</a><br>
这是屏幕截图:
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 <hr>
and is never hidden. The footer contains an <hr>
, the same "Part x of n" text and some functional links (Next, Pause, Tweet) that I don't want hidden.
I tried enclosing these in a <div id=timestamp>
. 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.</p>
<p>This function does not do any checking for problems. We assume,
in this case, that the input is always correct.</p>
</div>
</div>
<div>
<p>All that remains now is putting the pieces together.</div></div></div></div></span>
<hr>(Part 19 of about 74)<br>
<a href='http://www.mywebapp.com/index.php?action=next'>
<img border=0 src='http://www.mywebapp.com/images/next.png' alt='Get next text'</a>
<a href='http://www.mywebapp.com/index.php?action=pause&listid=252&itemid=2100'>
<img border=0 src='http://www.mywebapp.com/images/pause.png' alt='Pause this text'></a>
<a href='http://twitter.com/home?status=tweetGoesHere'><img border=0 src='http://www.mywebapp.com/images/twitter-a.png' alt='Tweet this'/></a><br>
Original page: <a href='http://eloquentjavascript.net/print.html'>here</a><br>
And here's a screenshot:
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这是其他答案中的技术,但这是我添加到 Rails 电子邮件模板中的确切行:
只需位于不应隐藏的内容下方。
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.
我通过将包含唯一不可见字符串的
附加到电子邮件页脚的每一行来解决此问题。起初,我只是将
time()
添加到每一行,但一些电子邮件客户端将其解释为电话号码并将该字符串转换为 URL。因此,我在字符串前/后添加了一个非数字字符,事情似乎工作正常。但必须有更好的方法来做到这一点......
I was able to solve this problem by appending a
<span>
containing a unique invisible string to each line of my email's footer. At first, I just addedtime()
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...
在 Gmail 将我的交易电子邮件分解成块并隐藏其中的重复部分之后,我在我的 meanie-mail-composer 包可以自动为我添加随机字符串。
默认情况下,此帮助程序在每个
标记之前包含一个隐藏的
,其中包含 5 个字符的随机字符串。
下面是实现此目的的代码片段 (Node.js):
不再有破碎的电子邮件!
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
<span>
with a 5 character random string before every</p>
tag by default.Here's the code snippet that does the trick (Node.js):
No more broken up emails!