<%
Dim fso, tf
Dim strHTML
Set fso = Server.CreateObject(
"SCRIPTING.FILESYSTEMOBJECT"
)
Set tf = fso.OpenTextFile(
"C:\Mail.htm"
, 1)
strHTML = tf.ReadAll
Write strHTML
Set tf = Nothing
Set fso = Nothing
Set objMail = Server.CreateObject(
"CDONTS.NEWMAIL"
)
objMail.From =
"iamchn@263.net"
objMail.To =
"iamchn@21cn.com"
objMail.Subject =
"TEST7"
objMail.Body = strHTML
objMail.BodyFormat = 0
objMail.MailFormat = 0
objMail.Importance = 2
objMail.AttachURL
"c:\logo.gif"
,
"logo.gif"
objMail.Send
Set objMail = Nothing
response.Write
"<script language='javascript'>alert('電郵已發送');</script>"
%>