下面我来列一下cdo组件的例子
set cdomail=server.CreateObject ("CDO.Message") 这个是关键,创建的是cdo组件,而不是cdonts
@#cdomail.MailFormat =0 这些属性在cdonts有,但是cdo中没有
@#cdomail.BodyFormat =0
cdomail.From =mail
cdomail.To="jaa@aacom"
@#cdomail.Bcc="sdfs@dfsdcom"
cdomail.Subject =product @#" request information "
@#//////////////////////////body content////////////////////////////
message="name:" & name & "<br>"
message=message & "company:" & company & "<br>"
@#message=message & "单位地址:" & address & "<br>"
@#message=message & "邮政编码:" & zip & "<br>"
message=message & "phone:" & phone & "<br>"
@#message=message & "传真:" & fax & "<br>"
message=message & "request time:" & ordertime & "<br>"
message=message & "request information:" & info & "<br>"
@#///////////////////////////////////////////////////
cdomail.htmlBody =message ‘这个也是关键的部分,和原来的body属性不一样
@#response.Write product & "<br>"
@#response.Write & "<br>"
@#response.end
cdomail.Send
set cdomail=nothing
延伸阅读
文章来源于领测软件测试网 https://www.ltesting.net/