我用Jmail发邮件,老是发不出去...我是用学校的局域网,上外网要代理,会不会有影响??下面是我的代码:
<%
Set Jmail=Server.CreateObject("JMail.Message")
Jmail.silent= true
Jmail.logging=true
Jmail.Charset="GB2312"
Jmail.ContentType="text/html"
Jmail.MailServerUserName = "myemail@126.com"
Jmail.MailServerPassWord = "123456"
JMail.AddHeader "Originating-IP", Request.ServerVariables("REMOTE_ADDR")
Jmail.From = "myemail@126.com"
Jmail.FromName="WRZ"
Jmail.AddRecipient "yourmail@163.com"
Jmail.Subject = "subject"
Jmail.Body = "content"
Jmail.Priority = 1
If Jmail.Send("smtp.126.com") = false Then
Response.Write Jmail.log
Else
Response.Write("<script language='javascript'>window.alert('发送成功!');</script>")
End If
Jmail.Close
Set JMail = Nothing
%>
他显示错误为:
The message was undeliverable. All servers failed to receive the message .execute() { Trying server mail:smtp.126.com smtp.126.com failed with the message: "Connection reset by client." No socket for server. ConnectToServer() 1 of 1 servers failed }
我用以下的代码发,弹出发送成功,却收不到邮件!!!!
<%
Set jmail = Server.CreateObject("JMAIL.SMTPMail") jmail.silent = true
jmail.logging = true
jmail.Charset = "GB2312"
jmail.ContentType = "text/html"
jmail.ServerAddress = "127.0.0.1"
jmail.AddRecipient "youremail@163.com"
jmail.SenderName = "WRZ"
jmail.Sender = "myemail@126.com"
jmail.Priority = 1
jmail.Subject = "title "
jmail.Body = "content"
If jmail.Execute() = false Then
Response.Write Jmail.log
Else
Response.Write("<script language='javascript'>window.alert('发送成功!');</script>")
End If
jmail.Close
set jmail=nothing
%>
麻烦大家帮忙下啊!!!!!!!
Jmail发不出邮件...