电子邮件套接字错误 [英] Email socket error

查看:64
本文介绍了电子邮件套接字错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个VB Win Forms应用程序,该应用程序使用内置的.NET邮件类发送电子邮件.

I have a VB Win Forms application that send emails using the built in .NET mail classes.

它在大多数PC上都可以正常工作,但在其中几台上却无法使用.

It works just fine for most PC's but on a couple of them it fails.

有问题的计算机已安装Windows 7,并且就更新而言都是最新的.

The offending machines have Windows 7 installed and are all up to date as far as updates are concerned.

我尝试禁用防病毒软件并关闭Windows防火墙,但没有任何作用.

I have tried disabling the Antivirus an switching off the Windows firewalls none of which made any difference.

我已经使用PortQry检查了服务器,一切都很好,并在正确的端口上进行了侦听.我必须要让其他机器正常工作,以防万一我仍然运行它.

I have checked the server using PortQry and everything is OK and listening on the correct port. It had to be for the other machines to work I know but just in case I ran it anyway.

我收到的错误是:

系统 . 网络 . 邮件 . SmtpException : 失败 发​​送邮件 . ----> 系统 . Net . WebException : 无法 连接到远程服务器 ---> 系统 . Net . 套接字 . span> SocketException : 尝试 以禁止的方式访问 中的套接字 by 其访问权限 999.999 . 999.999 : 25
  在
系统 . Net . 套接字 . /span> 套接字 . DoConnect ( EndPoint endPointSnapshot SocketAddress socketAddress )
  
系统 . Net . ServicePoint . ConnectSocketInternal ( 布尔值 connectFailure Socket s4 Socket s6 套接字 & 套接字 IPAddress & 地址 ConnectSocketState 状态 IAsyncResult asyncResult 例外 & 例外 )
  
--- End 的内部异常堆栈跟踪 ---
  
系统 . Net . ServicePoint . GetConnection ( PooledStream PooledStream 对象 所有者 <跨度>
布尔值

System.Net.Mail.SmtpException: Failure sending mail. ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: An attempt was made to access a socket in a way forbidden by its access permissions 999.999.999.999:25
   at
System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
   at
System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)
  
--- End of inner exception stack trace ---
   at
System.Net.ServicePoint.GetConnection(PooledStream PooledStream, Object owner, Boolean

我尝试使用TelNet,但是出现了通常的错误:无法连接到主机等...

还有什么我可以运行的以获取进一步的诊断,这些诊断可以帮助您识别阻止电子邮件发送的内容吗?

Is there anything else I can run to get further diagnostics that may help identify what is blocking the email send's?

预先感谢...

推荐答案

看起来很奇怪,您是否有一些代码可以显示您如何尝试发送电子邮件以及正在使用的.NET类?  
Looks strange, do you have some code that shows how you are trying to send the email and what .NET classes you are using?  


这篇关于电子邮件套接字错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆