jmail组件如何通过邮件网关的过滤

来源:互联网 发布:开淘宝店怎样描述店铺 编辑:程序博客网 时间:2024/06/09 02:31
jmail组件如何通过邮件网关的过滤
  
Set jmail = Server.CreateObject("JMAIL.Message") '建立发送邮件的对象
jmail.silent = true '屏蔽例外错误,返回FALSE跟TRUE两值j
jmail.logging = true '启用邮件日志
jmail.Charset = "GB2312" '邮件的文字编码为国标
jmail.ContentType = "text/html" '邮件的格式为HTML格式
jmail.AddRecipient Mail_to '邮件收件人的地址
jmail.From = Mailfrom '发件人的E-MAIL地址
jmail.MailServerUserName = "send" '登录邮件服务器所需的用户名
jmail.MailServerPassword = "***** " '登录邮件服务器所需的密码
jmail.Subject = Mailsubject '邮件的标题
jmail.Body = Content  '邮件的内容
'jmail.Prority = 1 '邮件的紧急程序,1 为最快,5 为最慢, 3 为默认值
jmail.Send("*.*.*.*") '执行邮件发送(通过邮件服务器地址)
if err then
Response.Write "邮件错误"&err.description
err.clear
else
response.write "成功发送"
Set MailObject = Nothing
end if
jmail.close()
 
今天用jmail4 做了个ASP的邮件发送程序,用于给制定人抄送博客上的日志。不过用了这个组件后页面提示成功发送,说明已经成功执行到了response.write "成功发送"这里。不过我的测试邮箱却没收到任何邮件,不知道哪里除了问题,为了找出问题,详细看了下jmail命令。然后将jmail.logging设为true在response.write "成功发送"后面跟了个'Response.Write( JMail.Log )。显示发送邮件过程中的日志。结果捕获了jmail发送邮件的过程。
 

The message was undeliverable. All servers failed to receive the message .execute() { Trying server mail:*。*。*。*<- 220 [st.*。*。*。*ESMTP BOX(Sendmail)] -> EHLO sic-qunhvtaabsy <- 250-st.------Hello [------], pleased to meet you 250-ENHANCEDSTATUSCODES 250-PIPELINING 250-8BITMIME 250-SIZE 20971520 250-DSN 250-DELIVERBY 250 HELP -> AUTH LOGIN <- 504 5.3.3 AUTH mechanism LOGIN not available Authentication failed. mail.shinwa.com.cn failed.. No socket for server. ConnectToServer() 1 of 1 servers failed }


   经过详细考证发现是被邮件网关程序拦截了,后自己创建了一个邮件服务器用同样的指令发送没有任何问题,但想用程序连接带邮件网关(BoxParagon)的邮件服务器。却一直无法通过,不明原因。目前只能使用自己的邮件服务器和163电子邮局提供的smtp邮件服务器。

经过继续尝试

$  telnet  172.16.1.15  25
Trying 172.16.1.15...
Connected to 172.16.1.15.
Escape character is '^]'.
220 ESMTP
auth plain
//尝试用文本密码进入
504 5.3.3 AUTH mechanism plain not available //和上面的报错一样,这种进阶指令的验证机制被移除。
ehlo test.com  // EHLO 指令打招呼,就可以使用進階指令
所以现在的问题是如何让jmail用hello通过过滤网关和邮件服务器打招呼。

   如果哪位大侠有这方面经验不妨告知通过JMAIL组件发送的邮件如何才能通过邮件网关的过滤。

原创粉丝点击