如何使用CDONTS发送邮件?
*注,Windows xp, Windows 2003 默认没有附带CDONTS.DLL,必须手动安装,你可以从Windows 2000的system32中得到该文件, |
代码分析
|
Source Code |
<%
Dim oMail, sBody, sCc, sBCc, sTo, sFrom, sSubject, sContentBase '//构造正文 sBody = "<HTML>" & _ "<HEAD>" & _ "<TITLE>用CDONTS发送邮件</TITLE>" & _ "<BODY>" & _ "WELCOME TO OUR COCOON sTudio.<BR>" & _ "<IMG SRC='http://www.ccopus.com/img/cocoon.gif'><p>" & _ "这幅图片来自AttachURL所指定的附件<IMG SRC=ha.jpg>" & _ "</BODY>" & _ "</HEAD>" & _ "</HTML>" sSubject = "用CDONTS发送邮件" sFrom = "sunrise@citiz.net" sTo = "sunrise_chen@citiz.net" sCc = "sunrise@jicang.com" sBCc = "sunrise@citiz.net" sContentBase = "http://www.ccopus.com/" Set oMail = Server.CreateObject("CDONTS.NewMail")
'//以URL形式添加附件,在附件列表中不可见,可以在正文中访问
'//指定邮件正文
Set oMail = Nothing |
本文地址:http://www.45fan.com/dnjc/70054.html