%@ Language=VBScript %> <%if len(Request.Form) > 0 then dim I, M, O for each I in Request.Form if len(Request.Form(I)) > 0 then _ M = M & I & ": " & Request.Form(I) & vbCrLf next function ValidEmail( eStr ) dim Chk1, Chk2, Chk3, I, cTmp Chk1 = 1 : Chk2 = 0 : Chk3 = 0 if len( eStr ) <= 3 then ValidEmail = false exit function end if for I = 1 to len( eStr ) cTmp = Mid( eStr, I, 1 ) if cTmp = "@" then if I = 1 then Chk1 = 0 : exit for end if if Mid( eStr, I + 1, 1 ) = "." then Chk1 = 0 : exit for end if if Chk2 = 0 then Chk2 = 1 else Chk2 = 0 : exit for end if end if next if Mid( eStr, len( eStr ) - 3, 1 ) = "." then Chk3 = 1 elseif Mid( eStr, len( eStr ) - 2, 1 ) = "." then Chk3 = 1 end if if Chk1 and Chk2 and Chk3 then ValidEmail = true else ValidEmail = false end if end function const cdoSendUsingPickup = 1 const cdoSendUsingPort = 2 dim objMail, objConf, Flds set objMail = Server.CreateObject("CDO.Message") set objConf = Server.CreateObject("CDO.Configuration") set Flds = objConf.Fields Flds.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = cdoSendUsingPort Flds.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "10.0.0.3" Flds.Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 10 Flds.Update objMail.Configuration = objConf objMail.To = "mike@logomotive.net" if ValidEmail(Request.Form("Email")) then objMail.From = Request.Form( "Email" ) else objMail.From = "webform@logomotive.net" end if objMail.Subject = "Web Site Feedback Form!" objMail.TextBody = M objMail.Send set Flds = nothing set objConf = nothing set objMail = nothing Session("AOK") = true Response.Redirect "order.asp" end if%>