How can I add javascript to an the email?

三世轮回 提交于 2019-11-26 21:43:54

问题


Is it possible to have a ajax button inside email? I want to add a button similar to the buttons inside a google calendar meeting invitation email.

Or is there any alternative option???


回答1:


Don’t count on it. Most if not all mail clients will refuse to run Javascript within an e-mail.

If you want to include buttons, insert images with different links to a public web page of yours. Also, do include the button images within the mail message itself (and reference them by Content-ID), since many mail clients nowadays even refuse to load remote images.

This is exactly what Google Calendar does. Of course, Gmail recognizes invitation attachments (text/calendar), and so provides its own interface for the yes/no/maybe buttons.




回答2:


Probably not, it depends on mail client but I would be incredibly suprised if I saw any that allowed scripts as this opens the floodgates for huge security compromise risks.

Edit

Your best option would probably be to look at support for iframes, again though, I would be suprised if many mail clients allowed use of this element.



来源:https://stackoverflow.com/questions/5193860/how-can-i-add-javascript-to-an-the-email

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!