1

How do I connect to Gmail using IMAP protocol? I want to retrieve email messages.

flag

2 Answers

1

Gmail runs TLS/SSL secured IMAP server on imap.gmail.com, port 993. Following C# code demonstrates how to connect to it using Rebex Secure Mail or Rebex Secure IMAP:

// connect and log in
Imap imap = new Imap();
imap.Connect("imap.gmail.com", 993, null, ImapSecurity.Implicit);
imap.Login(username, password);

// process messagess...

// logount and disconnect
imap.Disconnect();
link|flag
For more information about TLS/SSL and its modes (explicit/implicit), check out our tutorial at rebex.net/secure-mail.net/tutorial-ssl.aspx – Lukas Pokorny Jan 14 at 11:56
0

ImapSecurity.Implicit is not in the library. What library shall I include to run this? Otherwise it doesnt connect to the server.

link|flag
ImapSecurity.Implicit is in "Rebex Secure IMAP" and "Rebex Secure Mail", so please use one of these two. It is missing in "Rebex IMAP" and "Rebex Mail". – Lukas Pokorny Mar 2 at 11:34

Your Answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.