Click or drag to resize

Pop3 Class

POP3 client implementation. It allows listing, downloading and deleting emails from POP3 servers.
Inheritance Hierarchy

Namespace:  Limilabs.Client.POP3
Assembly:  Mail (in Mail.dll) Version: 3.0.23341.1754
Syntax
public class Pop3 : ClientBase

The Pop3 type exposes the following members.

Constructors
  NameDescription
Public methodPop3
Initializes new instance of the Pop3 class.
Public methodPop3(AddressFamily)
Initializes new instance of the Pop3 class.
Top
Properties
  NameDescription
Public propertyConfiguration
Gets POP3 protocol configuration.
Public propertyConnected
Gets a value indicating whether the underlying Socket is connected to a remote host. This property makes a nonblocking, zero-byte Send call to determine the current state of the connection.
(Inherited from ClientBase.)
Public propertyHasTimeStamp
Gets the value that indicates if there was a timestamp in server's greeting. Usually it means that APOP command (LoginAPOP(String, String)) is supported, but not always.
Public propertyInstanceId
Gets a randomly generated unique id that identifies this instance.
(Inherited from ClientBase.)
Public propertyIsCompressed
Gets a Boolean value that indicates whether communication to the remote server is compressed. You can turn compression on by using Compress method.
(Inherited from ClientBase.)
Public propertyIsEncrypted
Gets a Boolean value that indicates whether communication to the remote server is encrypted.
(Inherited from ClientBase.)
Public propertyIsMutuallyAuthenticated
Gets a Boolean value that indicates whether communication to the remote server is mutually authenticated.
(Inherited from ClientBase.)
Public propertyIsSigned
Gets a Boolean value that indicates whether communication to the remote server is signed.
(Inherited from ClientBase.)
Public propertyReadStream
Gets underlying read stream for current connection.
(Inherited from ClientBase.)
Public propertyReceiveTimeout
Gets or sets the amount of time the underlying Socket will wait to receive data once a read operation is initiated.
(Inherited from ClientBase.)
Public propertySendTimeout
Gets or sets the amount of time the underlying Socket will wait for a send operation to complete successfully.
(Inherited from ClientBase.)
Public propertyServerGreeting
Gets the server greeting (initial response).
Public propertySocket
Gets the underlying Socket.
(Inherited from ClientBase.)
Public propertySSLConfiguration
Gets SSL/TLS configuration (client certificates, enabled SSL/TLS protocols).
(Inherited from ClientBase.)
Public propertyWriteStream
Gets underlying write stream for current connection.
(Inherited from ClientBase.)
Top
Methods
  NameDescription
Public methodAttach(Socket)
Attaches client to specified connected socket.
(Inherited from ClientBase.)
Public methodAttach(Socket, Boolean)
Attaches client to specified connected socket.
(Inherited from ClientBase.)
Public methodAttachSSL
Attaches client to specified connected socket.
(Inherited from ClientBase.)
Public methodBeginConnect(String)
Begins an asynchronous request for a remote server connection using DefaultPort.
Public methodBeginConnect(IPEndPoint, Boolean)
Begins an asynchronous request for a remote server connection.
(Inherited from ClientBase.)
Public methodBeginConnect(String, Int32)
Begins an asynchronous request for a remote server connection. You can use BeginConnectSSL(String, Int32) when SSL/TLS connection is needed.
(Inherited from ClientBase.)
Public methodBeginConnect(String, AsyncCallback)
Begins an asynchronous request for a remote server connection using DefaultPort.
Public methodBeginConnect(String, Int32, Boolean)
Begins an asynchronous request for a remote server connection.
(Inherited from ClientBase.)
Public methodBeginConnect(String, Int32, Boolean, AsyncCallback)
Begins an asynchronous request for a remote server connection.
(Inherited from ClientBase.)
Public methodBeginConnectSSL(String)
Begins an asynchronous request for a remote server secure connection using DefaultSSLPort and SSL/TLS.
Public methodBeginConnectSSL(String, Int32)
Begins an asynchronous request for a remote server secure connection using SSL/TLS.
(Inherited from ClientBase.)
Public methodBeginConnectSSL(String, AsyncCallback)
Begins an asynchronous request for a remote server secure connection using DefaultSSLPort and SSL/TLS.
Public methodBeginConnectSSL(String, Int32, AsyncCallback)
Begins an asynchronous request for a remote server secure connection using SSL/TLS.
(Inherited from ClientBase.)
Public methodCapability
Sends CAPA command. Retrieves POP3 server capability list.
Public methodCapabilityAsync
Sends CAPA command. Retrieves POP3 server capability list.
Public methodClose
Sends QUIT command. Disconnects and releases all resources acquired by this object.
Public methodClose(Boolean)
Sends QUIT command. Disconnects and releases all resources acquired by this object.
Public methodCloseAsync
Sends QUIT command. Disconnects and releases all resources acquired by this object.
Public methodCloseAsync(Boolean)
Sends QUIT command. Disconnects and releases all resources acquired by this object.
Public methodConnect(String)
Connects to POP3 server on port 110. Use ConnectSSL(String) when SSL/TLS connection is needed.
Public methodConnect(IPEndPoint, Boolean)
Establishes connection to a remote server.
(Inherited from ClientBase.)
Public methodConnect(String, Int32)
Establishes connection to a remote server. You can use ConnectSSL(String, Int32) when SSL/TLS connection is needed.
(Inherited from ClientBase.)
Public methodConnect(IPAddress, Int32, Boolean)
Establishes connection to a remote server.
(Inherited from ClientBase.)
Public methodConnect(String, Int32, Boolean)
Establishes connection to a remote server.
(Inherited from ClientBase.)
Public methodConnectAsync(String)
Connects to POP3 server on port 110. Use ConnectSSL(String) when SSL/TLS connection is needed.
Public methodConnectAsync(IPEndPoint, Boolean)
Establishes connection to a remote server.
(Inherited from ClientBase.)
Public methodConnectAsync(String, Int32)
Establishes connection to a remote server. You can use ConnectSSL(String, Int32) when SSL/TLS connection is needed.
(Inherited from ClientBase.)
Public methodConnectAsync(IPAddress, Int32, Boolean)
Establishes connection to a remote server.
(Inherited from ClientBase.)
Public methodConnectAsync(String, Int32, Boolean)
Establishes connection to a remote server.
(Inherited from ClientBase.)
Public methodConnectSSL(String)
Connects to POP3 server using SSL/TLS on port 995.
Public methodConnectSSL(String, Int32)
Establishes connection to a remote server using SSL.
(Inherited from ClientBase.)
Public methodConnectSSLAsync(String)
Connects to POP3 server using SSL/TLS on port 995.
Public methodConnectSSLAsync(String, Int32)
Establishes connection to a remote server using SSL.
(Inherited from ClientBase.)
Public methodDeleteMessageByNumber
Marks specified message for deletion. POP3 server does not actually delete the message until successful QUIT command issued by Close or Close(Boolean).
Public methodDeleteMessageByNumberAsync
Marks specified message for deletion. POP3 server does not actually delete the message until successful QUIT command issued by Close or Close(Boolean).
Public methodDeleteMessageByUID
Deletes message specified by the uid. POP3 server does not actually delete the message until successful QUIT command issued by Close or Close(Boolean).
Public methodDeleteMessageByUIDAsync
Deletes message specified by the uid. POP3 server does not actually delete the message until successful QUIT command issued by Close or Close(Boolean).
Public methodDispose
Releases all resources acquired by this object. Closes connection, without issuing any quit commands.
(Inherited from ClientBase.)
Protected methodDispose(Boolean)
Releases all resources acquired by this object. Closes connection, without issuing any quit commands.
(Inherited from ClientBase.)
Public methodEndConnect
Ends a pending asynchronous connection request.
(Inherited from ClientBase.)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetAccountStat
Gets stat information from server.
Public methodGetAccountStatAsync
Gets stat information from server.
Public methodGetAll
Gets UIDS of all messages.
Public methodGetAllAsync
Gets UIDS of all messages.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetHeadersByNumber
Gets headers of the specified email message from server. Use MailBuilder class to create IMail object.
Public methodGetHeadersByNumberAsync
Gets specified mail message containing only headers. Use MailBuilder class to create IMail object.
Public methodGetHeadersByUID
Gets headers of the specified email message from server. Use MailBuilder class to create IMail object.
Public methodGetHeadersByUIDAsync
Gets headers of the specified mail message from server. Use MailBuilder class to create IMail object.
Public methodGetMessageByNumber
Gets specified email message from server. Use MailBuilder class to create IMail object.
Public methodGetMessageByNumberAsync
Gets specified mail message from server. Use MailBuilder class to create IMail object.
Public methodGetMessageByUID
Gets specified email message from server. Use MailBuilder class to create IMail object.
Public methodGetMessageByUIDAsync
Gets specified mail message from server. Use MailBuilder class to create IMail object.
Public methodGetSizeByNumber
Returns the size (in bytes) of all messages. Keys are message numbers (starting from 1), value is the size of the message.
Public methodGetSizeByNumber(Int64)
Returns the size (in bytes) of specified message in bytes.
Public methodGetSizeByNumberAsync
Returns the size (in bytes) of all messages. Keys are message numbers (starting from 1), value is the size of the message.
Public methodGetSizeByNumberAsync(Int64)
Returns the size (in bytes) of specified message in bytes.
Public methodGetSizeByUID
Returns the size (in bytes) of all messages. Keys are message uids, value is the size of the message.
Public methodGetSizeByUID(String)
Returns the size (in bytes) of specified message in bytes.
Public methodGetSizeByUIDAsync
Returns the size (in bytes) of all messages. Keys are message uids, value is the size of the message.
Public methodGetSizeByUIDAsync(String)
Returns the size (in bytes) of specified message in bytes.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGetUID
Sends UIDL command to the pop3 server. Returns a key value collection. Keys are message numbers (starting from 1), value is a unique-id of the message.
Public methodGetUID(Int64)
Sends UIDL command to the pop3 server. Returns unique-id for that message.
Public methodGetUIDAsync
Sends UIDL command to the pop3 server. Returns a key value collection. Keys are message numbers (starting from 1), value is a unique-id of the message.
Public methodGetUIDAsync(Int64)
Sends UIDL command to the pop3 server. Returns unique-id for that message.
Public methodLogin
Logs user in using USER and PASS commands. This method sends the password in clear text, unless SSL/TLS connection is used.
Public methodLoginAPOP
Logs user in using APOP command. This method does NOT send the password in clear text.
Public methodLoginAPOPAsync
Logs user in using APOP command. This method does NOT send the password in clear text.
Public methodLoginAsync
Logs user in using USER and PASS commands. This method sends the password in clear text, unless SSL/TLS connection is used.
Public methodLoginCRAM
Logs user in using AUTH CRAM-MD5 command. This method does NOT send the password in clear text.
Public methodLoginCRAMAsync
Logs user in using AUTH CRAM-MD5 command. This method does NOT send the password in clear text.
Public methodLoginDIGEST(String, String)
Logs user in using AUTH DIGEST-MD5 command. This method does NOT send the password in clear text.
Public methodLoginDIGEST(String, String, String)
Logs user in using AUTH DIGEST-MD5 command. This method does NOT send the password in clear text.
Public methodLoginDIGESTAsync(String, String)
Logs user in using AUTH DIGEST-MD5 command. This method does NOT send the password in clear text.
Public methodLoginDIGESTAsync(String, String, String)
Logs user in using AUTH DIGEST-MD5 command. This method does NOT send the password in clear text.
Public methodLoginOAUTH2
Logs user in using AUTHENTICATE XOAUTH2 command. This method does NOT send the password. You can use DotNetOpenAuth to create the key. You can check which authentication methods remote server supports using SupportedAuthenticationMethods method.
Public methodLoginOAUTH2Async
Logs user in using AUTHENTICATE XOAUTH2 command. This method does NOT send the password. You can use DotNetOpenAuth to create the key. You can check which authentication methods remote server supports using SupportedAuthenticationMethods method.
Public methodLoginPLAIN(String, String)
Logs user in using AUTHENTICATE PLAIN command. This method sends the password in clear text (BASE64), unless SSL/TLS connection is used.
Public methodLoginPLAIN(String, String, String)
Logs user in using AUTH PLAIN command. This method sends the password in clear text (BASE64), unless SSL/TLS connection is used.
Public methodLoginPLAINAsync(String, String)
Logs user in using AUTHENTICATE PLAIN command. This method sends the password in clear text (BASE64), unless SSL/TLS connection is used.
Public methodLoginPLAINAsync(String, String, String)
Logs user in using AUTH PLAIN command. This method sends the password in clear text (BASE64), unless SSL/TLS connection is used.
Public methodLoginSSPI
Logs user in using Negotiate mechanism. Target will be constructed as "pop/" + TargetHost name.
Public methodLoginSSPI(SSPIMechanism)
Logs user in using specified mechanism (Negotiate, Kerberos or NTLM). Target will be constructed as "pop/" + TargetHost name.
Public methodLoginSSPI(SSPIMechanism, String)
Logs user in using specified mechanism (Negotiate, Kerberos or NTLM).
Public methodLoginSSPI(SSPIMechanism, String, String)
Logs user in using specified mechanism (Negotiate, Kerberos or NTLM). Target will be constructed as "pop/" + TargetHost name.
Public methodLoginSSPI(SSPIMechanism, String, String, String)
Logs user in using specified mechanism (Negotiate, Kerberos or NTLM).
Public methodLoginSSPIAsync
Logs user in using Negotiate mechanism. Target will be constructed as "pop/" + TargetHost name.
Public methodLoginSSPIAsync(SSPIMechanism)
Logs user in using specified mechanism (Negotiate, Kerberos or NTLM). Target will be constructed as "pop/" + TargetHost name.
Public methodLoginSSPIAsync(SSPIMechanism, String)
Logs user in using specified mechanism (Negotiate, Kerberos or NTLM).
Public methodLoginSSPIAsync(SSPIMechanism, String, String)
Logs user in using specified mechanism (Negotiate, Kerberos or NTLM). Target will be constructed as "pop/" + TargetHost name.
Public methodLoginSSPIAsync(SSPIMechanism, String, String, String)
Logs user in using specified mechanism (Negotiate, Kerberos or NTLM).
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodNoop
Sends NOOP command to the server. It does nothing and always succeeds. Can be used to reset any inactivity auto-logout timer on the server.
Public methodNoopAsync
Sends NOOP command to the server. It does nothing and always succeeds. Can be used to reset any inactivity auto-logout timer on the server.
Public methodSend
Sends specified byte array to the server.
(Inherited from ClientBase.)
Public methodSendAsync
Sends specified byte array to the server.
(Inherited from ClientBase.)
Public methodSendCommand(String)
Sends command, which expects to receive single-line response, to POP3 server (e.g. "STAT").
Public methodSendCommand(String, Boolean)
Sends command, which expects to receive single-line response, to POP3 server (e.g. "STAT").
Public methodSendCommandAsync(String)
Sends command, which expects to receive single-line response, to POP3 server (e.g. "STAT").
Public methodSendCommandAsync(String, Boolean)
Sends command, which expects to receive single-line response, to POP3 server (e.g. "STAT").
Public methodSendMultiLineCommand(String)
Sends command, which expects to receive multi-line response, to POP3 server (e.g. "RETR").
Public methodSendMultiLineCommand(String, Boolean)
Sends command, which expects to receive multi-line response, to POP3 server (e.g. "RETR").
Public methodSendMultiLineCommandAsync(String)
Sends command, which expects to receive multi-line response, to POP3 server (e.g. "RETR").
Public methodSendMultiLineCommandAsync(String, Boolean)
Sends command, which expects to receive multi-line response, to POP3 server (e.g. "RETR").
Public methodStartTLS
Sends 'STLS' command and initializes SSL/TLS connection (issues CAPA command afterwards). Not all servers support STLS. You can check which extensions remote server supports using SupportedExtensions method.
Public methodStartTLSAsync
Sends 'STLS' command and initializes SSL/TLS connection (issues CAPA command afterwards). Not all servers support STLS. You can check which extensions remote server supports using SupportedExtensions method.
Public methodSTLS
Sends 'STLS' command and initializes SSL/TLS connection (issues CAPA command afterwards). Not all servers support STLS. You can check which extensions remote server supports using SupportedExtensions method.
Public methodSTLSAsync
Sends 'STLS' command and initializes SSL/TLS connection (issues CAPA command).
Public methodSupportedAuthenticationMethods
Lists authentication methods supported by the remote POP3 server.
Public methodSupportedExtensions
Lists extensions supported by the remote POP3 server (e.g. STLS, TOP)
Public methodTcpKeepAlive
Turns TCP protocol keep alive (SO_KEEPALIVE) option on.
(Inherited from ClientBase.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodUseBestLogin
Logs user in using best method available. When no SASL capability is found, this method switches to SSL/TLS (STLS) and tries again.
Public methodUseBestLoginAsync
Logs user in using best method available. When no SASL capability is found, this method switches to SSL/TLS (STLS) and tries again.
Top
Events
  NameDescription
Public eventServerCertificateValidate
Event which is called for custom server certificate validation.
(Inherited from ClientBase.)
Top
Fields
  NameDescription
Public fieldStatic memberDefaultPort
Default POP3 protocol port (110). If you need to use different port please use port parameter in Connect(String, Int32) or Connect(String, Int32, Boolean) method.
Public fieldStatic memberDefaultSSLPort
Default POP3 protocol over SSL/TLS port (995). If you need to use different port please use use port parameter in ConnectSSL(String, Int32) or Connect(String, Int32, Boolean) method.
Top
See Also