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

asked 12 Jan '10, 13:41

Rebex%20KB's gravatar image

Rebex KB ♦♦
258519
accept rate: 63%

edited 28 Feb '11, 10:07

Lukas%20Pokorny's gravatar image

Lukas Pokorny ♦♦
2.4k28


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

answered 12 Jan '10, 13:49

Rebex%20KB's gravatar image

Rebex KB ♦♦
258519
accept rate: 63%

edited 02 Mar '10, 11:35

Lukas%20Pokorny's gravatar image

Lukas Pokorny ♦♦
2.4k28

For more information about TLS/SSL and its modes (explicit/implicit), check out our tutorial at http://www.rebex.net/secure-mail.net/tutorial-ssl.aspx

(14 Jan '10, 11:56) Lukas Pokorny ♦♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×76
×20

Asked: 12 Jan '10, 13:41

Seen: 2,166 times

Last updated: 05 Apr '11, 16:37