The code below consist of two sections. The first
is the actaul HTML for the form that you will need to place on your
contact page, and the second is the ASP file that sends the form
input to your email address.
Add this code to the page you wish to send email from.
<form action="cdonts.asp" method="POST">
<input type="hidden" name="recipient" size="25"
value="youremail@yourserver.com">
<table width=100% border=0 cellpadding=0 cellspacing=0>
<tr>
<td>Name </td>
<td><input type="text" name="name"
size="25"></td>
</tr>
<tr>
<td>Email </td>
<td><input type="text" name="email"
size="25"></td>
</tr>
<tr>
<td>Message </td>
<td><textarea rows="7" name="message"
cols="30"></textarea></td>
</tr>
</table>
<input type="submit" value="Submit"> <input
type="reset" value="Reset">
</form>
The Script - cdonts.asp
This is the ASP page that sends the email and then redirects the
person who filled your form in to thankyou.asp.
<% @language="VBSCRIPT" %>
<%
Set objMail = Server.CreateObject("CDONTS.Newmail")
objMail.To = request.form ("recipient")
objMail.Subject = request.form ("name")
objMail.From = request.form ("email")
objMail.Body = request.form ("message")
objMail.Send
Set objMail = Nothing
Response.Redirect "thankyou.asp"
%>