admin管理员组

文章数量:1344220

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???

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???

Share Improve this question edited Jun 21, 2019 at 9:56 Liam 29.8k28 gold badges139 silver badges203 bronze badges asked Mar 4, 2011 at 12:43 user279244user279244 9715 gold badges19 silver badges32 bronze badges 1
  • HTML is already horrible enough in emails... now JavaScript? Please no!! – Felix Kling Commented Mar 4, 2011 at 13:21
Add a ment  | 

2 Answers 2

Reset to default 5

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.

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 promise 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.

本文标签: How can I add javascript to an the emailStack Overflow