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的邮箱,没空呀。
延伸阅读
文章来源于领测软件测试网 https://www.ltesting.net/