用cdonts发送邮件的两个函数

发表于:2007-06-30来源:作者:点击数: 标签:
用cdonts发送邮件的两个函数,非常好用,快记录下来! -------------------------------------------------------------------------------- freezwy 于 2001-6-29 11:47:02 加贴在 Joy ASP ←返回版面 % sub sendmail(fromwho,towho,subject,body) dim cdo s
用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.clearcase/" target="_blank" >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
%

原文转自:http://www.ltesting.net