您的位置:常見問題 > 程式應用 > ASP
支持 JMail 嗎?

我們的 Windows 寄存服務支持 JMail。以下是以 ASP 編寫的簡單 JMail
更多資料,請瀏覽
JMail Website
 
例子一: 利用本機作 SMTP 伺服器
====================================

Set JMail = Server.CreateObject("JMail.SMTPMail")
JMail.ServerAddress = "www.YourDomain.com"
JMail.Sender = "
yourname@yourdomain.com"
JMail.Subject = "JMail Sample"
JMail.AddRecipient "
recipient@theirdomain.com"
JMail.body = "This is a sample message sent with JMail."
JMail.Execute

 
例子二: 指定 SMTP 伺服器和登入用戶+密碼
====================================

set msg = Server.CreateOBject( "JMail.Message" )
msg.Logging = true
msg.silent = true
msg.From = "
test@mydomain.com"
msg.FromName = "My Realname"
msg.AddRecipient "
recipient@hisDomain.com", "His Name"
msg.AddRecipient "
recipientelle@herDomain.com"
msg.Subject = "How you doin?"
msg.Body = "Hello Jim" & vbCrLf & vbCrLf & "How's it going? ..."
' username = user%domain.com
' password = password
' smtp server = smtp.isp.com
if not msg.Send("user%domain.com:password@
smtp.isp.com" ) then
    Response.write msg.log
else
    Response.write "Message sent succesfully!"
end if