Sending a User's Feedback to the Webmaster in an Email By Rob Taylor
Here is a simple example of sending the results of a form to the Webmaster (via an email).
<%
'Get all the form data entered by the user
mail = request.form("email")
fname = request.form("first")
lname = request.form("last")
reply = "Reply TO <rob@tconsult.com>"
Set objMail = Server.CreateObject("CDONTS.NewMail")
objMail.From = reply
objMail.Subject = "Sending Form Data in CDONTS from ASPadvice"
objMail.To = mail
'This is the mail body. vbCrLf puts in a new line. (like <BR>)
objMail.Body = fname & " " & lname & " " & mail & vbcrlf& vbcrlf&_
"This information was submitted " & vbcrlf&_
"from a form"
objMail.Send
set objMail = nothing
response.write("Message was sent successfully")
%>
For a more in-depth look at this process, be sure to read: Mailing Form Results.