2010-11-17 23 views
0

我写了一个简单的应用程序通过GMail SMTP服务器发送电子邮件。但是,它在运行时返回一个异常。 在我的工作场所gmail被封锁(无法访问gmail.com)。是因为这个错误吗?这个错误是因为GMail被封锁了吗?

 
    System.Net.Mail.SmtpException: Failure sending mail. ---> System.Net.WebExceptio 
    n: Unable to connect to the remote server ---> System.Net.Sockets.SocketExceptio 
    n: A connection attempt failed because the connected party did not properly resp 
    ond after a period of time, or established connection failed because connected h 
    ost has failed to respond 74.125.113.109:587 

回答

1

是的,它看起来像是有关。该请求可能被防火墙阻止。

+0

gotcha。谢谢。 – xbonez 2010-11-17 15:54:49

1

它们很可能阻止端口587上的出站通信。

1

答案可能是肯定的。当您试图访问Gmail时,gmail服务器出现故障的可能性很小,但很明显,由于您被阻止,您将无法连接。

0

不,这是因为您的网络管理员在公司的防火墙中阻止了此IP或端口。

+0

所以,答案是肯定的然后..... – KevinDTimm 2010-11-17 15:56:55

+0

@Kevin - 实际上它不是,因为SMTP服务器和Web服务器使用不同的IP地址和TCP端口。 – adamk 2010-11-17 20:07:41

+0

gotcha - 以某种方式错过了区别:) – KevinDTimm 2010-11-17 20:30:00

0

是的,由于连接失败而出现异常,但可能不一定是因为它被阻止。我甚至不能连接到主机:

> telnet 74.125.113.109 587 
Trying 74.125.113.109... 
telnet: connect to address 74.125.113.109: Connection refused 

编辑:在第二次看,我可以连接到另一台机器主机。可能还有其他连接问题正在进行。

+0

我得到“无法打开连接到端口587上的主机” – xbonez 2010-11-17 16:08:05

相关问题