如何附加html文件,以便gmail的“查看”选项工作 [英] How to attach html file so that gmail's "view" option works
问题描述
我有一个脚本发送带有html附件的电子邮件。当我在gmail中选择查看时,我得到文本...但是,当我点击下载而不是查看,然后打开它,它会显示它应该。
I have a script that sends an email with an html attachment. When I select "view" in gmail I get text...however when I click on "download" instead of "view", then open it, it displays as it should.
我认为这是gmail相关的,因为我观察到与IE,FireFox(win / linux),Chrome(win / linux)完全相同的行为
I think it's gmail related because I observe the exact same behavior from IE, FireFox(win/linux), Chrome(win/linux)
这里的视频:
http://www.youtube.com/watch?v=WkGyxcFQXS8
我做错了什么?
感谢
并非所有的电子邮件客户端都支持< style>
标签。 Gmail是其中之一;它只尊重在线造型。
Not all email clients support the <style>
tag. Gmail is one of those; it only respects in-line styling.
如果您的代码正在生成css& html,那么你可以改变它为表使用内联样式。
If your code is producing the css & html, then you could change it to use in-line styles for the table.
如果你想要更多的自动魔术,请参见如何我使用Google Apps脚本将CSS页面更改为带有内置样式的页面?。
If you want something more auto-magic, see How do I use Google Apps Script to change a CSS page to one with inline styles?.
这篇关于如何附加html文件,以便gmail的“查看”选项工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!