0 votes
by (8.4k points)

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

Applies to: Rebex Secure Mail

1 Answer

+1 vote
by (8.4k points)
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

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