Page 1 of 1

How to add javascript codes in the HTML email body

Posted: Wed May 31, 2006 6:11 am
by susovanchanda
Hello,

Can anyone tell me whether its possible to add some javascript codes in the HTML email body?

Regards

Susovan Chanda


[url=http://forums.devnetwork.net/viewtopic.php?t=30037]Forum Rules[/url] Section 1.1 wrote:1. Select the correct board for your query. Take some time to read the guidelines in the sticky topic.

Posted: Wed May 31, 2006 6:38 am
by Weirdan
yes, it's possible

Posted: Thu Jun 15, 2006 7:07 am
by susovanchanda
How?

Posted: Thu Jun 15, 2006 7:21 am
by Weirdan
insert them between <script> and </script> tags

Posted: Thu Jun 15, 2006 7:46 am
by susovanchanda
Thanks for your response.
Are you sure about this? Because I have already tried with this and sent some test mails(HTML type) to yahoo and gmail account. But it does not work.

Posted: Thu Jun 15, 2006 7:58 am
by Roja
susovanchanda wrote:Thanks for your response.
Are you sure about this? Because I have already tried with this and sent some test mails(HTML type) to yahoo and gmail account. But it does not work.
Yahoo and gmail both strip javascript from emails. Most major web based email systems do. Javascript in an email is almost definitely a bad thing.

Posted: Thu Jun 15, 2006 8:10 am
by susovanchanda
You are right. I have observed the same in view source.
Actually I was using javascript in the email body so that when the mail is forwarded or opened it(javascript) will report to the server. In this way I can keep track my email i.e. I can knwo the email addresses where my email has been forwarded to.

Seems it javascript will not help me to do this. Do you have any idea?

Posted: Thu Jun 15, 2006 9:26 am
by Weirdan
Actually I was using javascript in the email body so that when the mail is forwarded or opened it(javascript) will report to the server.
That's one of these bad things Roja has mentioned.

Posted: Thu Jun 15, 2006 11:55 am
by Roja
susovanchanda wrote:Actually I was using javascript in the email body so that when the mail is forwarded or opened it(javascript) will report to the server. In this way I can keep track my email i.e. I can knwo the email addresses where my email has been forwarded to.

Seems it javascript will not help me to do this. Do you have any idea?
My idea would be not to do that, or to encourage readers to click to your site because you have something worthwhile on your site to click on.

But ignoring the importance of actually building content worth going to, just to trick users to give you what you want (all while giving them nothing in return), the current common practice in email is to include an image served from your server. That image is accessed by the user, which your server logs - their IP, possibly their browser string, the time, etc.

Notably, many mail programs (gmail included) also turn off images.

You are trying to do something that most sane people recognize as giving no value to a user, and giving great value to you - without telling the user. Since the programs are there to help the users - not you - most programs make it hard to do that.

Posted: Thu Jun 15, 2006 1:08 pm
by Chris Corbyn
~susovanchanda I've just read over every post you've made on this board. I hope I'm wrong but it sure sounds like you're intent on harvesting email addresses and beyond that you want to check which ones are actually in use. Invasion of privacy? Yes.

I'm *asking* you not to post any further queries on this matter here. Post elsewhere on this issue - it's harsh situation if you have legitimate reasons I know. But how could you explain any legitimate reason for needing this? You should be asking your users for the info... not taking it transparently.

Regards,

d11