How to connect to Gmail using POP3?

0 votes
asked Jan 12, 2010 by Rebex KB (8,220 points)
edited Jan 15, 2010

How do I connect to Gmail using Rebex Mail or Rebex POP3 component?

Applies to: Rebex Secure Mail

1 Answer

+1 vote
answered Jan 12, 2010 by Rebex KB (8,220 points)
edited Jan 15, 2010
 
Best answer

Gmail runs TLS/SSL secured POP3 server on pop.gmail.com, port 995. The following C# code demonstrates how to connect to it using Rebex Secure Mail or Rebex Secure POP3:

// connect and log in
Pop3 client = new Pop3();
client.Connect("pop.gmail.com", 995, null, Pop3Security.Implicit);
client.Login(email, password);

// process messagess...

// logount and disconnect
client.Disconnect();

For a complete example, see the following blogpost HOWTO: Download emails from a GMail account in C#

...