<%
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("發(fā)送成功") else Response.Write("發(fā)送不成功")
    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 '設(shè)置為true,JMail不會拋出例外錯誤.
    JMail.ContentType = "text/plain" '郵件正文格式
    'JMail.ServerAddress = SMTPServer '用來發(fā)送郵件的SMTP服務(wù)器(無效)
    '指定郵件服務(wù)器的地址?梢灾付ǘ鄠服務(wù)器,用分號點開。可以指定端口號。
    '如果serverAddress保持空白,JMail會嘗試解決遠(yuǎn)程郵件服務(wù)器,然后直接發(fā)送到服務(wù)器上去。???
    '如:JMail.ServerAddress = &tquo;mail.mydom.net; mail2.mydom.net:2500" 
    JMail.MailServerUserName = SMTPServerUserName '登錄用戶名
    JMail.MailServerPassWord = SMTPServerPassword '登錄密碼
    JMail.MailDomain = MailDomain '域名(如果用“name@domain.com”這樣的用戶名登錄時,請指明domain.com
    JMail.AddRecipient MailtoAddress,MailtoName '收信人
    JMail.Subject = Subject '主題
    JMail.Body = MailBody '郵件正文(純文本格式)
    JMail.FromName = FromName '發(fā)信人姓名
    JMail.From = MailFrom '發(fā)信人Email
    JMail.Priority = Priority '郵件等級12345
    msg = JMail.Send(SMTPServer)
    JMail.Close
    set JMail = nothing
    SendMail = msg
end function
%>
旗下網(wǎng)站:耐思智慧 - 淘域網(wǎng) - 我的400電話 - 中文域名:耐思尼克.cn 耐思尼克.top
耐思智慧 © 版權(quán)所有 Copyright © 2000-2025 IISP.COM,Inc. All rights reserved
                備案號碼:
                粵ICP備09063828號 
                公安備案號:
                 粵公網(wǎng)安備 44049002000123號 
                
                域名注冊服務(wù)機(jī)構(gòu)許可:粵D3.1-20240003
                CN域名代理自深圳萬維網(wǎng)
                
                    粵公網(wǎng)安備 44049002000123號 
                
                域名注冊服務(wù)機(jī)構(gòu)許可:粵D3.1-20240003
                CN域名代理自深圳萬維網(wǎng)
            
聲明:本網(wǎng)站中所使用到的其他各種版權(quán)內(nèi)容,包括但不限于文章、圖片、視頻、音頻、字體等內(nèi)容版權(quán)歸原作者所有,如權(quán)利所有人發(fā)現(xiàn),請及時告知,以便我們刪除版權(quán)內(nèi)容
本站程序界面、源代碼受相關(guān)法律保護(hù), 未經(jīng)授權(quán), 嚴(yán)禁使用; 耐思智慧 © 為我公司注冊商標(biāo), 未經(jīng)授權(quán), 嚴(yán)禁使用