To read the article online, visit http://www.4GuysFromRolla.com/webtech/faq/Email/faq4.shtml

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.


Article Information
Article Title: Sending a User's Feedback to the Webmaster in an Email
Article Author: Scott Mitchell
Article URL: http://www.4GuysFromRolla.com/webtech/faq/Email/faq4.shtml


Copyright 2017 QuinStreet Inc. All Rights Reserved.
Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers