欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

CDONTS发电子邮件[代码]

程序员文章站 2022-03-26 17:57:54
click here to copy the code to your clipboard (only for ie users)declare variablesdim cdon...
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 = "info@scriptmate.com"

from address
cdontsobj.from = "you@yoursite.com"

cc email addresses seperated by a comma
cdontsobj.cc = "support@scriptmate.com,amit@millioncolors.com"

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

技术交流 永无止境