Search The ForumSearch   RegisterRegister  LoginLogin

MailBee.NET POP3

 AfterLogic Forum : MailBee.NET POP3
Subject Topic: Socket Exception Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
ay1585
Newbie
Newbie
Avatar

Joined: 01 April 2009
Location: India
Online Status: Offline
Posts: 7
Posted: 03 April 2009 at 7:13am | IP Logged Quote ay1585

While connecting to Gmail Server (pop.gmail.com) with my gmail credentials,I am getting an Exception

"Socket connection has timed out . Inner exception message as follows: A connection exception failed because the connected party did not respond after a period of time, or established connection failed because connected host has failed to respond."

Please suggest me as to what I should do in such cases.
Back to Top View ay1585's Profile Search for other posts by ay1585
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6104
Posted: 03 April 2009 at 7:27am | IP Logged Quote Igor

GMail requires accessing POP3 accounts via SSL. The following code sample performs connection to POP3 account, displays number of messages in Inbox:
Code:
Pop3 pop = new Pop3();
pop.SslMode = SslStartupMode.OnConnect;
pop.Connect("pop.gmail.com", 995);
pop.Login("login", "password");
Console.WriteLine(pop.InboxMessageCount + " message(s) in inbox");
pop.Disconnect();
Console.ReadLine();


The last line is used to keep console open until Enter is pressed, remove this line if you don't need it.

Regards,
Igor
Back to Top View Igor's Profile Search for other posts by Igor
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide