%@ Language=VBScript %> <% option explicit Response.Buffer=true %> <% dim sql, txtError, txtHeader, txtSuccess txtError = "" txtHeader = "See You in Asia Newsletter" txtSuccess= "" if Request.Form("PATAnews")="Crikey" then '1. Check if the EMAIL field is filled out. if len(Request.Form("Email"))<5 then txtError = "
It appears that you forgot to fill in the Email field.
" txtError = txtError & "You must fill out the email field in order to receive the newsletter!
" txtError = txtError & "Please go back to complete it." txtError = txtError & "Thank you.
" end if '2. Check if the two emails match. if len(txtError)=0 then if UCase(Request.Form("Email")) <> UCase(Request.Form("Email2")) then txtError = "The email you filled in does not match the confirm email field.
" txtError = txtError & "You must fill the same email address into both blanks in order to receive this email.
" txtError = txtError & "Please go back to complete it." txtError = txtError & "Thank you.
" end if end if if len(txtError)>0 then txtHeader = "Error!" end if 'If they are good, put it in the database. if len(txtError)=0 then sql = "insert into PATAnewsletter (FName, LName, City, State, Country, Email) values (" sql = sql & "'" & cleanup(Request.Form("FName")) & "', " sql = sql & "'" & cleanup(Request.Form("LName")) & "', " sql = sql & "'" & cleanup(Request.Form("City")) & "', " sql = sql & "'" & cleanup(Request.Form("State")) & "', " sql = sql & "'" & cleanup(Request.Form("Country")) & "', " sql = sql & "'" & cleanup(Request.Form("Email")) & "')" oConn.Execute(sql) txtSuccess= "Thank you for subscribing to the See You in Asia newsletter. " txtSuccess = txtSuccess & "You will be receiving a confirmation email message shortly.
" txtSuccess = txtSuccess & "Please continue to explore the See You in Asia " txtSuccess = txtSuccess & "web site.
" Dim MyBody, oMail, WhichWay WhichWay = "CDONTS.NewMail" if instr(UCase(Request.ServerVariables("SERVER_NAME")),"FUZINT.COM")>0 then WhichWay = "Persits.MailSender" 'MyBody = "Dear " & Request.Form("FName") & " " & Request.Form("LName") & vbcrlf & vbcrlf MyBody = "Thank you for subscribing to the See You in Asia email newsletter. " MyBody = MyBody & "If you would like to unsubscribe from the See You in Pacific Asia email newsletter, " MyBody = MyBody & "please send an email message to remove@seeyouinpacificasia.com." & vbcrlf & vbcrlf MyBody = MyBody & "Thank you again." Set oMail = CreateObject(WhichWay) oMail.Subject="Confirmation: Your subscription to the See You in Asia email newsletter" oMail.Body= MyBody oMail.From= "newsletter@seeyouinpacificasia.com" 'oMail.From = "mark@fuzint.com" if WhichWay="CDONTS.NewMail" then oMail.To= Request.Form("Email") else oMail.AddAddress Request.Form("Email") oMail.Host = "smtp.atlantech.net" end if On Error Resume Next oMail.Send set oMail=nothing On Error Goto 0 end if end if %>