指引网

当前位置: 主页 > 编程开发 > ASP >

附件:sendmail.asp

来源:网络 作者:佚名 点击: 时间:2017-06-22 20:44
[摘要] !-- This sample script uses the CDO for NTS Library to send email to a specific user. Leon Braginski nbsp;Note: To is a reserved word, so we added an underscore to it. -- %@ LANGUAGE = VBScript % % If (Request.ServerVariables (REQUEST_METHO
<!--
    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"
%>

------分隔线----------------------------