温柔网

 找回密码
 注册

查看: 525|回复: 0

常用Email组件发送函数

[复制链接]
发表于 2003-12-16 22:47:32 | 显示全部楼层 |阅读模式
常用Email组件发送函数

--------------------------------------------------------------------------------

   转自csdn
   <%
    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
   %>  
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|手机版|小黑屋|温柔网 ( 浙ICP备13033583号-8 )

GMT+8, 2024-11-21 20:27 , Processed in 0.037847 second(s), 22 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表