雖然,最後的結果很令人噴飯,不過還是整理了在ASP裡可用的郵寄元件分享一下..
PS.電子報請自動加入迴圈執行
[CDONTS]
Set mail = Server.CreateObject( "CDONTS.NewMail" )
mail.To = RS.Fields("EMail").Value
mail.From = CMail
mail.Subject = Upload("Tit")
mail.BodyFormat = 0
mail.MailFormat = 0
mail.Body = Content
mail.Send
[CDO]
Set objEmail = CreateObject("CDO.Message")
objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "msa.hinet.net"
objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "xx"
objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "xx"
objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
objEmail.From = CMail
objEmail.To = RS.Fields("EMail").Value
objEmail.Subject = Upload("Tit")
objEmail.HTMLbody = Content
objEmail.Configuration.Fields.Update
objEmail.Send
Set objEmail=Nothing
[JMail]
Set JMail = Server.CreateObject("JMail.Message")
JMail.Subject = Upload("Tit")
JMail.ContentType = "text/html"
JMail.Charset = "big5"
JMail.Encoding = "base64"
JMail.ISOEncodeHeaders = False
JMail.Priority = 3
JMail.From = CMail
JMail.AddRecipient RS.Fields("EMail").Value
JMail.silent = true
JMail.Body = Content
JMail.Send("msa.hinet.net")
set JMail = nothing
沒有留言:
張貼留言