共有2356人关注过本帖树形打印

主题:常用Email组件发送函数

帅哥哟,离线,有人找我吗?
gaofeng
  1楼 个性首页 | QQ | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:管理员 帖子:3510 积分:11231 威望:5 精华:7 注册:2000-5-19 10:19:38
常用Email组件发送函数  发帖心情 Post By:2014-2-24 15:24:46

<%
sub Jmail(email)
Dim JMail,SendMail
Set JMail=Server.CreateObject("JMail.SMTPMail")
JMail.Logging=True
JMail.Charset="gb2312"
JMail.C
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
%>


 


支持(0中立(0反对(0回到顶部