Web Applications Stack Exchange is a question and answer site for power users of web applications. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I send a HTML email having JavaScript using Gmail or Yahoomail to Gmail or Yahoomail?

share|improve this question
up vote 11 down vote accepted

You shouldn't - allowing JavaScript to run in a e-mail client would be a huge security risk.

I originally said "you can't" but it's been pointed out that some clients will execute the Javascript. So, hopefully Gmail and Yahoomail don't allow scripting for this very reason.

On a personal note, I think HTML in e-mails should be avoided to. What's wrong with plain text?

share|improve this answer
Sadly, many HTML capable mail clients will execute the Javascript. – Cry Havok Oct 28 '10 at 11:48
@Cry Havok - perhaps I should change the answer to "You shouldn't". – ChrisF Oct 28 '10 at 11:55
@Cry Havok name one. – Pekka 웃 Oct 28 '10 at 12:00
@Pekka, older version of Outlook Express did ISTR (since they just hooked IE) and I've a feeling Outlook did too once. Haven't checked recently whether that's still the case. – Cry Havok Oct 28 '10 at 13:18
"What's wrong with plain text?" - The same thing that's wrong with plain text web pages. – SooDesuNe Oct 30 '10 at 19:37

Send a link to a web page and request that they manually click the link.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.