设计、网站、推广
始于2004年
当前位置:首页 > 网站制作

ASP中常用Email组件发送函数

发表日期:2009-3-13 作者来源:派谷网络 浏览次数:

<%
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
%>

本文章系本站编辑转载,转载目的在于传递更多信息,并不代表本网赞同其观点和对其真实性负责。如涉及作品内容、版权和其它问题,请在30日内与本站联系,我们将在第一时间删除内容!

相关网站设计案例

相关推荐新闻
网站建设解决方案