<%
Set Email = Server.CreateObject("CDO.Message"); 'CDO.Message 是 Windows 2000 內建傳送email 元件,它許多功能(html格式、透過exchange server寄信、可設定編碼)
Email.From ="aa@hotmail.com" '寄件者
Email.To ="xx@hotmail.com" '收件者
Email.Subject ="XX實業來信" '主旨
Email.HtmlBody ="<html><body>simple content</body></html>"
Email.BodyPart.Charset = "big5"
Set Conf = CreateObject("CDO.Configuration")
Set Flds = Conf.Fields
With Flds
.Item("HTTP://schemas.microsoft.com/cdo/configuration/sendusing") = 2 '使用網路上傳送訊息
.Item("HTTP://schemas.microsoft.com/cdo/configuration/smtpserver") = "127.0.0.1" 'Exchange Server IP
.Item("HTTP://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 '使用的port
.Item("HTTP://schemas.microsoft.com/cdo/configuration/sendusername") = "testacount" '帳號
.Item("HTTP://schemas.microsoft.com/cdo/configuration/sendpass<a href="HTTP://www.it165.net/edu/ebg/" target="_blank" class="keylink">word</a>") = "pass<a href="HTTP://www.it165.net/edu/ebg/" target="_blank" class="keylink">word</a>" '密碼
.Update '整批更新剛才的設定
End With
Email.Configuratoin = Conf
Email.Send '寄送email
Set Email = nothing '清除此物件
Set Conf = nothing
%>

 

創作者介紹
創作者 shadow 的頭像
shadow

資訊園

shadow 發表在 痞客邦 留言(0) 人氣()