<%
if Request("MailtoAddress") <> "" then
msg = SendMail
(Request("SMTPServer"),Request("SMTPServerUserName"),Request("SMTPServerPassword"),
Request("MailDomain"),Request("MailtoAddress"),Request("MailtoName"),Request("Subject"),
Request("MailBody"),Request("FromName"),Request("MailFrom"),Request("Priority"))
if msg then Response.Write("發送成功") else Response.Write("發送不成功")
Response.End()
end if
function
SendMail(SMTPServer,SMTPServerUserName,SMTPServerPassword,MailDomain,MailtoAddress,MailtoName,
Subject,MailBody,FromName,MailFrom,Priority)
dim JMail, msg
set JMail=Server.CreateObject("JMail.Message")
JMail.Charset="gb2312" '編碼
JMail.silent=true '設置為true,JMail不會拋出例外錯誤.
JMail.ContentType = "text/plain" '郵件正文格(ge)式
'JMail.ServerAddress = SMTPServer '用來發送郵件的SMTP服務器(無效)
'指定郵件服務器的地址。可以指定多個服務器,用分號點開。可以指定端口號。
'如果serverAddress保持空白,JMail會嘗試解決遠程郵件服務器,然后直接發送到服務器上去。???
'如:JMail.ServerAddress = &tquo;mail.mydom.net; mail2.mydom.net:2500"
JMail.MailServerUserName = SMTPServerUserName '登(deng)錄用戶名
JMail.MailServerPassWord = SMTPServerPassword '登(deng)錄(lu)密碼
JMail.MailDomain = MailDomain '域名(如果用“name@domain.com”這樣的用戶名登錄時,請指明domain.com
JMail.AddRecipient MailtoAddress,MailtoName '收信人
JMail.Subject = Subject '主題
JMail.Body = MailBody '郵件正文(wen)(wen)(純(chun)文(wen)(wen)本格式)
JMail.FromName = FromName '發(fa)信人姓名(ming)
JMail.From = MailFrom '發信人(ren)Email
JMail.Priority = Priority '郵(you)件等級12345
msg = JMail.Send(SMTPServer)
JMail.Close
set JMail = nothing
SendMail = msg
end function
%>
旗下網站:耐思智慧 - - - 中文域名:
耐思智慧 © 版權所有 Copyright © 2000-2025 szjicheng.cn,Inc. All rights reserved
備案號碼:
公安備案號:
聲(sheng)明(ming):本網(wang)站(zhan)中所使(shi)用到(dao)的其他各種版(ban)權(quan)(quan)內容,包括但不限(xian)于文章、圖片、視(shi)頻(pin)、音(yin)頻(pin)、字體等內容版(ban)權(quan)(quan)歸原(yuan)作(zuo)者所有,如(ru)權(quan)(quan)利所有人發現,請及時告知,以便我們刪(shan)除版(ban)權(quan)(quan)內容
本(ben)站程序(xu)界(jie)面、源代碼受相關法(fa)律保護(hu), 未(wei)經授(shou)權, 嚴禁(jin)使用; 耐思(si)智慧 © 為我公司注(zhu)冊商標, 未(wei)經授(shou)權, 嚴禁(jin)使用
法律顧問: