当前位置: 首页 > 图文教程 > 网络编程 > ASP > 常用Email组件发送函数

ASP
分享一段代码show.asp?id=26变成show/?26的形式
SQL存储过程初探
asp下载防盗链代码
解决ASP(图像)上传漏洞的方法
获取远程flash并保存到本地
多域名一网站时如果返回最原来的域名
一些值得一看的代码asp
[原创]完美解决ASP 不能更新。数据库或对象为只读。
5天学会asp
超精华的asp代码大全
用xmlhttp编写web采集程序
非常不错的flash采集程序测试通过
淘特ASP木马扫描器的代码
ASP编程入门进阶(一):安装配置服务器
ASP编程入门进阶(二):认识表单
6行代码实现无组件上传(author:stimson)
ASP编程入门进阶(七):内置对象Server
有关Server.Mappath详细接触
利用SA FileUp组件进行多文件上传
个性验证码的制作方法

ASP 中的 常用Email组件发送函数


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-11-03   浏览: 80 ::
收藏到网摘: n/a

给大家看一下常用Email组件发送函数

<%
sub Jmail(email)
Dim JMail,SendMail
Set JMail=Server.CreateObject("JMail.SMTPMail")
JMail.Logging=True
JMail.Charset="gb2312"
JMail.ContentType = "text/html"
JMail.ServerAddress=SMTPServer
JMail.Sender=SystemEmail
JMail.Subject=topic
JMail.Body=mailbody
JMail.AddRecipient email
JMail.Priority=3
JMail.Execute
Set JMail=nothing
if err then
SendMail=err.description
err.clear
else
SendMail="OK"
end if
end sub

sub Cdonts(email)
dim objCDOMail
Set objCDOMail = Server.CreateObject("CDONTS.NewMail")
objCDOMail.From =SystemEmail
objCDOMail.To =email
objCDOMail.Subject =topic
objCDOMail.Body =mailbody
objCDOMail.Send
Set objCDOMail = Nothing
if err then
SendMail=err.description
err.clear
else
SendMail="OK"
end if
end sub

sub aspemail(email)
Set mailer=Server.CreateObject("ASPMAIL.ASPMailCtrl.1") 
recipient=email
sender=SystemEmail
subject=topic
message=mailbody
mailserver=SMTPServer
result=mailer.SendMail(mailserver, recipient, sender, subject, message)
if err then
SendMail=err.description
err.clear
else
SendMail="OK"
end if
end sub
%>