jmail發郵件驗證失敗後一種變通的解決辦法

來源:互聯網
上載者:User
經曆幾天的沉澱和研究,翻爛了論壇的精華,發現問這問題的人還真不少,不過俺終於把這該死的jmail發郵件驗證問題搞定了,雖然還不算完美,但至少可以交差了。。驗證經研究發現,sina的smtp驗證太厲害了,不管怎麼樣傳資料都說驗證失敗,於是我抱著試試看的態度去www.126.com申請一個50MB的郵箱(哈,超大,趕快哦!),試了一下,報告“無效的user”,於是我把msg.From也改成tindy@126.com,奇蹟發生了,郵件發出去了,也!!!代碼如下:
Set msg = Server.CreateObject("JMail.Message")
msg.silent = true
msg.Logging = true
msg.Charset = "gb2312"
msg.MailServerUserName = "tindy@126.com"
msg.MailServerPassWord = "我的郵箱密碼"
msg.AddHeader "Originating-IP", Request.ServerVariables("REMOTE_ADDR")
msg.From = "tindy@126.com" ' 就是這個傢伙,不能隨便寫的,一定要填你在126.com上申請的郵箱,很納悶
msg.FromName = Request.Form("Name")
msg.AddRecipient "tindy@sina.com"
msg.Subject = "test"
body=request.form("Content")
msg.Body = body
if not msg.Send ("smtp.126.com") then
Response.write "<pre>" & msg.log & "</pre>"
else
set msg = nothing
Response.Write "郵件已發送!"
end if
'========================================
已知問題是,對於sina的smtp驗證,同樣的方法,卻無法通過,一直納悶中,希望高手能夠幫我解決,因為俺可不想每個月登陸126.com的郵箱,沒空呀。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.