设为首页 | 加入收藏 | 
ASP用Jmail组件发送邮件
作者:佚名 时间:05月09日 来源:互联网 浏览次数:【字号: 】 

'****************************************************
'函数名:SendMail
'作  用:用Jmail组件发送邮件
'参  数:ServerAddress  ----服务器地址
'        AddRecipient  ----收信人地址
'        Subject       ----主题
'        Body          ----信件内容
'        Sender        ----发信人地址
'****************************************************
function SendMail(MailServerAddress,AddRecipient,Subject,Body,Sender,MailFrom)
 on error resume next
 Dim JMail
 Set JMail=Server.CreateObject("JMail.SMTPMail")
 if err then
  SendMail= "<br><li>没有安装JMail组件</li>"
  err.clear
  exit function
 end if
 JMail.Logging=True
 JMail.Charset="gb2312"
 JMail.ContentType = "text/html"
 JMail.ServerAddress=MailServerAddress
 JMail.AddRecipient=AddRecipient
 JMail.Subject=Subject
 JMail.Body=MailBody
 JMail.Sender=Sender
 JMail.From = MailFrom
 JMail.Priority=1
 JMail.Execute
 Set JMail=nothing
 if err then
  SendMail=err.description
  err.clear
 else
  SendMail="OK"
 end if
end function

 

 * 以上任何内容或信息侵犯了你的利益,请及时联系!
泡泡搜索
最新文章
热点文章
精彩推荐
 - TOP