View Full Version : Javascript E-mails

07-09-2003, 08:30 PM
I am in the process of completeing my javascript e-mail generator. One last part that I need it to include is a from address in the e-mail so that any return e-mails are returned to a certain location. Here is the code I used so far:

<p align="left" style="word-spacing: 0; line-height: 100%; margin-top: 0; margin-bottom: 0">button
&nbsp;&nbsp;&nbsp;<INPUT TYPE="button" VALUE="Generate E-Mail"
onClick="parent.location='mailto:test@test.com?subject=Test E-mail&from=testhelp@test.com&cc=anothertest@test.com&body=test.%0d%0aTest1 :%0d%0aTest2 :%0d%0aTest3 :%0d%0aTest4 :%0d%0aTest5'">


I thought that the from portion would work. It makes the from box on the e-mail but then does not populate the value that it is equal to. Can some one help.

07-10-2003, 12:20 AM
You mean like this thing (http://www.webreference.com/js/column70/3.html)?

07-10-2003, 01:34 AM
Yes other than the fact that it does not populate the from on the e-mail like I need. The from is the only part of the script that I can not get to work.

07-10-2003, 02:03 AM
Oh, you can't set the "from" address without a server-side language, which have the capability to set the email headers, which is where the "from" address is stored.

In short, you can't do that with javascript.

07-10-2003, 02:06 AM
Thank you for the help