% 'Declare variables for the e-mail script dim strAddr dim replyTo dim strSubject dim strText 'Next, declare itsReady variable so we can trigger e-mail function 'only if user has entered an e-mail address. A real form would 'have a stringent error checking routine dim itsReady itsReady = "" 'Get input from the form and assign it to script variables strAddr = Trim(Request.form("user_email")) if strAddr <> "" then replyTo = cstr(strAddr) end if strSubject = Request.form("user_subject") strName = Request.form("user_name") strMsg = Request.form("user_text") strText = "E-mail from: " & strName & vbCrLf & "Concerning: " & strMsg 'Note: use vbCrLf (as above) to add line breaks in e-mail message 'Now trigger e-mail function if submitted with a non-blank user_email if replyTo <> "" then itsReady = send_email() 'The send_email function formats and sends the e-mail function send_email() 'Create an object or container for your mail Dim objMail Set objMail = Server.CreateObject("CDO.Message") 'Format the e-mail using fields from your HTML form objMail.To = "info@barmatchless.com" objMail.From = "webmail@barmatchless.com" 'The From address is a fake address to alert you to 'the origin of the email. You will not reply to it. objMail.ReplyTo = replyTo 'replyTo is the user_email address from the form objMail.Subject = strSubject objMail.TextBody = strText objMail.Send 'comment out to test script without sending mail 'Release system resources Set objMail = Nothing 'Book example includes following line; replaced by a Javascript alert box 'Response.Write "