<%
dim objmail
set objmail = server.createobject("cdonts.newmail")
//these are all the images that are in this message.
//you must include them like this.
//please note that you do not have to write the
//entire file path in the <img> tag in the body after this.
//make sure you see the image name after the path separated by a comma
objmail.attachurl "d:\images\myimage.gif", "myimage.gif"
objmail.attachurl "d:\images\myimage2.gif", "myimage2.gif"
html = html & "<html>"
html = html & "<head>"
html = html & "<title>send mail with html</title>"
html = html & "</head>"
html = html & "<body bgcolor=""lightyellow"">"
html = html & "<table cellpadding=""4"">"
html = html & "<tr><th><font color=""darkblue"" size=""4"">"
html = html & now() & " - "
html = html & "these are all great asp sites</font></th></tr>"
html = html & "<tr><td>"
html = html & "<a href=""http://www.4guysfromrolla.com"">"
html = html & "<img src=""myimage.gif""></a><br><br>"
html = html & "<a href=""http://www.4guysfromrolla.com"">"
html = html & "<img src=""myimage2.gif""></a><br><br>"
html = html & "</font></td></tr></table><br><br>"
html = html & "</body>"
html = html & "</html>"
objmail.from = "rob@tconsult.com"
objmail.subject = "your daily html mail"
you need to add these lines for the mail
to be sent in html format
objmail.bodyformat = 0
objmail.mailformat = 0
objmail.to = "you@yourhouse.com
objmail.body = html
objmail.send
response.write("mail was sent")
set objmail = nothing
%>
文章整理:西部数码--专业提供域名注册、虚拟主机服务
http://www.west263.com
以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!


