Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Return Email 1

Status
Not open for further replies.

hazel5hwe

Technical User
Nov 28, 2009
1
GB
Hi All
Many moons ago I found the code below and I have used it
successfully ever since with no problems - is it possible to add to the code
a line that will automatically send the received message back to the person who the email is from.

<html>
<head>
<title>Weekly Details</title>
<script type="text/javascript">
function sendform()
{
with (document.form1)
{
var body = ''
var i = elements.length , j = 0
while (i-- > 3) // drop last two elements
{
var tname = elements[j].id
body += tname + ""
if (tname == "Comment")
body += '%0d%0a' // line break before comment text
body += elements[j].value + '%0d%0a' // line break after each line
j += 1
} // end while
}
window.location = "mailto:" + "????" +"@"+ "????" + ".??.??"
+ "?subject=Weekly Details"
+ "&body=" + body
}
</script>
First Post
Thank You - Hazel
 
You really should use a server side script to do the email send - see among others. Assuming that you could get the users email address in the first place you could do something like
Greg Griffiths
Livelink Certified Developer & ECM Global Star Champion 2005 & 2006
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top