febrocks
04-18-2006, 02:35 PM
Hello everyone,
I'm sure you want to hear this but I don't know ASP and this script is from hostned. I configured it for my site and it works but the script does not include the name of the person submitting. Can I do that with this script? And if so, how can I ? If you can post a link on the info would be great.
code: html
<form method="post" action="sendjmail.asp">
<h2>Web Email Form</h2>
<p>We would like to hear from you. Please complete this form and click the "Submit" button and we will address your question/comments as soon as we get them. Thank you.</p>
<table border="0" cellpadding="5" cellspacing="3" width="400" id="table1" style="border-collapse: collapse; border-style: dashed; border-width: 1px" align="center">
<tr>
<td bgcolor="#D9FBFF"><font face="Arial"><font size="2"><b>Your name
<br>
</b></font>
<input type="text" size="25" name="name"></font></td>
</tr>
<tr>
<td bgcolor="#D9FBFF"><font face="Arial"><font size="2"><b>Your email address</b>
(ie: youraddress@yourdomain.com)<br>
</font>
<input type="text" size="25" name="email"></font></td>
</tr>
<tr>
<td bgcolor="#D9FBFF"><!--<font face="Arial"><font size="2"><b>Recipient
email</b><br>
</font>--><input type="hidden" size="25" name="recipient" value="glogems@glogems.com"><!--</font>--></td>
</tr>
<tr>
<td bgcolor="#D9FBFF"><font face="Arial"><font size="2"><b>Subject </b><br>
</font><select name="subject" size="1">
<option value="information">Information</option>
<!--<option value="price">Price List Request</option>-->
<option value="feedback">Feedback</option>
</select><font size="2"> </font></font></td>
</tr>
<tr>
<td bgcolor="#D9FBFF"><font face="Arial"><font size="2"><b>Enter your
comments here </b><br>
</font><textarea name="body" cols="40" rows="5" wrap="PHYSICAL">
</textarea><font size="2"> </font></font></td>
</tr>
<tr>
<td bgcolor="#D9FBFF">
<p align="center"><font face="Arial">
<input type="submit" value=" Submit "></font></p>
</td>
</tr>
</table>
<p><font size="2" face="Arial"> </font></p>
</form>
code: sendjmail.asp
<html>
<head>
<title></title>
<!-- Script courtesey of HostNed.com - Affordable Web Hosting for Personal and Small Business websites -->
</head>
<body>
<p align="center"><font face="Arial" size="5">Email Form</font></p>
<font face="Arial"><%
Name = Request.Form("name")
SenderEmail = Request.Form("email")
Subject = "Regarding " & Request.Form("subject")
Recipient = Request.Form("recipient")
Body = Request.Form("body")
Set JMail = Server.CreateObject("JMail.SMTPMail")
' Below you should enter your own SMTP-server
JMail.ServerAddress = "smtp.hostglobe.com"
JMail.Sender = Senderemail
JMail.Subject = Subject
JMail.AddRecipient Recipient
JMail.Body = Body
JMail.Priority = 3
JMail.AddHeader "Originating-IP", Request.ServerVariables("REMOTE_ADDR")
JMail.Logging = True
JMail.Execute
%> </font><center><font face="Arial" size="3">Your email has been sent to <%= Recipient %><br />
</font></center>
<p align="center"><font face="Arial"><a href="webform.html">Back to form</a></font></p>
<p align="center"><font face="Arial"><a href="index.html">Back to Home Page</a></font></p>
</body>
</html>
Thanks,
Eugene
I'm sure you want to hear this but I don't know ASP and this script is from hostned. I configured it for my site and it works but the script does not include the name of the person submitting. Can I do that with this script? And if so, how can I ? If you can post a link on the info would be great.
code: html
<form method="post" action="sendjmail.asp">
<h2>Web Email Form</h2>
<p>We would like to hear from you. Please complete this form and click the "Submit" button and we will address your question/comments as soon as we get them. Thank you.</p>
<table border="0" cellpadding="5" cellspacing="3" width="400" id="table1" style="border-collapse: collapse; border-style: dashed; border-width: 1px" align="center">
<tr>
<td bgcolor="#D9FBFF"><font face="Arial"><font size="2"><b>Your name
<br>
</b></font>
<input type="text" size="25" name="name"></font></td>
</tr>
<tr>
<td bgcolor="#D9FBFF"><font face="Arial"><font size="2"><b>Your email address</b>
(ie: youraddress@yourdomain.com)<br>
</font>
<input type="text" size="25" name="email"></font></td>
</tr>
<tr>
<td bgcolor="#D9FBFF"><!--<font face="Arial"><font size="2"><b>Recipient
email</b><br>
</font>--><input type="hidden" size="25" name="recipient" value="glogems@glogems.com"><!--</font>--></td>
</tr>
<tr>
<td bgcolor="#D9FBFF"><font face="Arial"><font size="2"><b>Subject </b><br>
</font><select name="subject" size="1">
<option value="information">Information</option>
<!--<option value="price">Price List Request</option>-->
<option value="feedback">Feedback</option>
</select><font size="2"> </font></font></td>
</tr>
<tr>
<td bgcolor="#D9FBFF"><font face="Arial"><font size="2"><b>Enter your
comments here </b><br>
</font><textarea name="body" cols="40" rows="5" wrap="PHYSICAL">
</textarea><font size="2"> </font></font></td>
</tr>
<tr>
<td bgcolor="#D9FBFF">
<p align="center"><font face="Arial">
<input type="submit" value=" Submit "></font></p>
</td>
</tr>
</table>
<p><font size="2" face="Arial"> </font></p>
</form>
code: sendjmail.asp
<html>
<head>
<title></title>
<!-- Script courtesey of HostNed.com - Affordable Web Hosting for Personal and Small Business websites -->
</head>
<body>
<p align="center"><font face="Arial" size="5">Email Form</font></p>
<font face="Arial"><%
Name = Request.Form("name")
SenderEmail = Request.Form("email")
Subject = "Regarding " & Request.Form("subject")
Recipient = Request.Form("recipient")
Body = Request.Form("body")
Set JMail = Server.CreateObject("JMail.SMTPMail")
' Below you should enter your own SMTP-server
JMail.ServerAddress = "smtp.hostglobe.com"
JMail.Sender = Senderemail
JMail.Subject = Subject
JMail.AddRecipient Recipient
JMail.Body = Body
JMail.Priority = 3
JMail.AddHeader "Originating-IP", Request.ServerVariables("REMOTE_ADDR")
JMail.Logging = True
JMail.Execute
%> </font><center><font face="Arial" size="3">Your email has been sent to <%= Recipient %><br />
</font></center>
<p align="center"><font face="Arial"><a href="webform.html">Back to form</a></font></p>
<p align="center"><font face="Arial"><a href="index.html">Back to Home Page</a></font></p>
</body>
</html>
Thanks,
Eugene