mail.asp

来自「较为详细的介绍了asp自定义的各种函数,方便asp的各种开发.」· ASP 代码 · 共 17 行

ASP
17
字号
<% 
Set msg = Server.CreateObject("JMail.Message") 
msg.silent = true 
msg.Logging = true 
msg.Charset = "gb2312" 
msg.MailServerUserName = "*****@126.com" ''输入smtp服务器验证登陆名 (邮局中任何一个用户的Email地址) 
msg.MailServerPassword = "*****"  ''输入smtp服务器验证密码  (用户Email帐号对应的密码) 
msg.From ="*****@126.com"' Request.Form("email")    ''发件人Email 
msg.FromName = "小灰"'Request.Form("name")   ''发件人姓名 
msg.AddRecipient "*****@163.com"  ''收件人Email 
msg.Subject = "信件主题"'Request.Form("subject")  ''信件主题 
msg.Body = "正文"'Request.Form("body")     ''正文 
'msg.addattachment(server.mappath("new.txt"))
msg.Send ("smtp.126.com")        ''smtp服务器地址(企业邮局地址) 
set msg = nothing 
response.write("发送成功!")
%>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?