<!-- This sample script uses the CDO for NTS Library to send email to a specific user. Leon Braginski & Matt Powell (c) Note: "To" is a reserved word, so we added an underscore to it. --> <%@ LANGUAGE = "VBScript" %> <% If (Request.ServerVariables ("REQUEST_METHOD") = "POST") then From = Request.Form("from") To_ = Request.Form("to") Subject = Request.Form("subject") Body = Request.Form("body") else ' Assume it is GET From = Request.QueryString("from") To_ = Request.QueryString("to") Subject = Request.QueryString("subject") Body = Request.QueryString("body") end if Set objNewMail = Server.CreateObject ("CDONTS.NewMail") objNewMail.Send From, To_, Subject, Body Set objNewMail = Nothing Response.Write "Message was sent" %> |