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

ASP
ASP中用Join和Array,可以加快字符连接速度。
采用ODBC接口访问MySQL指南
最大限度优化你的Asp性能
实现让每句话的头一个字母都大写
如何尽快释放掉Connection对象建立的连接?
把数据插入到数据库的两种方法
Connection对象的应用
查看ASP Session 变量的小工具
用XMLHTTP组件正确解析图片地址并将其保存
利用XMLHTTP 从其他页面获取数据
Request与Request.Form的速度测试
用SOAP和ASP进行服务器端更新
ASP开发网页时需要牢记的注意事项列表
面向对象的ASP技术:思考与实践
提供一种“间接防止另存为”的方法
格式化数字函数FormatNumber
怎么样写一段高效,安全的sql查询代码
关于Adodb.Stream的使用说明
不用EOF以加快记录循环
防止重复提交的巧妙方法

ASP 中的 CDONTS发电子邮件例子


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-11-03   浏览: 104 ::
收藏到网摘: 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