<%@ LANGUAGE="VBScript" %> Portuguese Fireside <% '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 = "" if strAddr <> "" then replyTo = cstr(strAddr) end if 'strSubject = Request.form("user_subject") strSubject = "Portuguese Fireside" 'strName = Request.form("user_name") strMsg1 = Request.form("user_text1") strMsg2 = Request.form("user_text2") strMsg3 = Request.form("user_text3") strText = "Q1: " & strMsg1 & vbCrLf & vbCrLf & "Q2: " & strMsg2 & vbCrLf & vbCrLf & "Q3: " & strMsg3 '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 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 = "martinsm@byuh.edu" objMail.From = "martinsm@byuh.edu" '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 "

Thank you for using e-mail!

" if err.number > 0 then response.write "Errors were encountered in sending your e-mail message. "&_ "Please try again, or contact the webmaster" else %> <% end if end function %>
Muito obrigado .