Ayush
Ayush

Reputation: 42450

Is this error because GMail is blocked?

I wrote a simple app to send an email via GMail SMTP servers. However, it returns an exception at runtime. At my workplace gmail is blocked (cannot access gmail.com). Is this error because of that?

    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

Upvotes: 0

Views: 539

Answers (5)

Wyatt Anderson
Wyatt Anderson

Reputation: 9893

Yes, the exception is coming up because the connection failed, but it might not necessarily be because it's blocked. I can't even connect to that host:

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

Edit: on second look, I can connect to that host from another machine. There might be other connectivity issues afoot.

Upvotes: 0

adamk
adamk

Reputation: 46804

No, it's because your network administrator has blocked this IP or port in the company's firewall.

Upvotes: 0

KevinDTimm
KevinDTimm

Reputation: 14376

The answer is probably yes. There is a small possibility that the gmail server was down when you tried to access it, but it's clear that since you're blocked, you won't be able to connect.

Upvotes: 1

Ta01
Ta01

Reputation: 31630

They are most likely blocking outbound traffic on port 587.

Upvotes: 1

Darin Dimitrov
Darin Dimitrov

Reputation: 1038940

Yeap, it looks like it is related to that. The request could be blocked by the firewall.

Upvotes: 1

Related Questions