当前位置: 首页 > 图文教程 > 网络编程 > ASP > CDONTS发电子邮件例子

ASP
ASP XML操作类代码
asp读取xml实例代码
ASP读取XML实例 优酷专辑采集程序 雷锋版
asp自带的内存缓存 application
Cookies 欺骗漏洞的防范方法(vbs+js 实现)
asp清理缓存的代码
asp Driver和Provider两种连接字符串连接Access时的区别
asp 性能测试报告 学习asp朋友需要了解的东西
ASP实例代码:asp操作Excel类
ASP 高亮显示不区分大小写的关键字
ASP XMLDom在服务器端操作XML文件的主要方法和实现
IE8内部对渲染模型的判断流程
web开发人员必须知道的Unicode与字符集相关知识

ASP 中的 CDONTS发电子邮件例子


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

  Click here to copy the Code to your clipboard (Only for IE Users)


'Declare Variables
Dim CDONTSObj, MessageBody

'Create the CDONTS object
Set CDONTSObj = Server.CreateObject("CDONTS.NewMail")

'To Address
CDONTSObj.To = "[email protected]"

'From Address
CDONTSObj.From = "[email protected]"

'CC Email Addresses seperated by a comma
CDONTSObj.cc = "[email protected],[email protected]"

'Your Email Message
MessageBody = "Sending a email using ASP was never so easy ! "

'Subject of the Email Message
CDONTSObj.Subject = "Send a Email"

'Assigning the value of your message to the Object
CDONTSObj.Body = MessageBody

'Send the email
CDONTSObj.Send

'Set the CDONTS object to nothing
Set CDONTSObj = nothing