用cdonts发送邮件的两个函数,非常好用,快记录下来!
——————————————————————————–
freezwy 于 2001-6-29 11:47:02 加贴在 joy asp ←返回版面
<%
sub sendmail(fromwho,towho,subject,body)
dim cdo
set cdo=server.createobject("cdonts.newmail")
cdo.from=fromwho
cdo.to = towho
cdo.subject =subject
cdo.body =body
cdo.mailformat=0
说明是以mime发送
cdo.bodyformat=0
可以包含html代码
cdo.importance=0
邮件的优先级别0-1-2
cdo.cc=xx@xx.net 抄送
cdo.bcc=xx@sf.net密送
cdo.attachfile "" 附件
cdo.send
set cdo=nothing
end sub
sub sendattachmail(fromwho,towho,subject,body,attachfile)
dim cdo
set cdo=server.createobject("cdonts.newmail")
cdo.from=fromwho
cdo.to = towho
cdo.subject =subject
cdo.body =body
cdo.mailformat=0
cdo.bodyformat=0
cdo.importance=0
cdo.attachfile attachfile
cdo.send
set cdo=nothing
end sub
%
