Internet Message Access Protocol (IMAP) is the most commonly used protocol for retrieving messages from an email server. In order to access the mailbox from your client applications, you would first need to establish a connection with the IMAP server. To achieve this, this article covers how to connect to an IMAP server via SOCKS or HTTP proxy using C#. Furthermore, you will learn how to connect to an SSL-enabled IMAP server programmatically.