Pop3 Class
Namespace: Rebex.Net
Assembly: Rebex.Pop3.dll (version 7.0.9083)
Provides methods for communication with POP3 servers.
Syntax
public class Pop3 : NetworkSession, ILogWriterProvider, IDisposable
Inherited Members
Remarks
All members of this class are thread-safe.
Constructors
Name | Description |
---|---|
Pop3() | Initializes a new instance of the Pop3 class. |
Fields
Name | Description |
---|---|
DefaultImplicitSslPort | Default POP3/Implicit SSL port (995). |
DefaultPort | Default POP3 port (110). |
Properties
Name | Description |
---|---|
AbortTimeout | Gets or sets the length of time before the abort operation times out. |
DefaultLogWriter | Gets or sets a default log writer used by all new instances of NetworkSession object. Inherited from NetworkSession. |
Encoding | Gets or sets the Encoding used to encode command arguments sent to the server and decode received answers. |
InstanceId | Gets instance ID (intended for logging purposes). Inherited from NetworkSession. |
IsAuthenticated | Returns a value indicating whether the session is authenticated. |
IsBusy | Gets a value indicating whether there any operation (method) in progress. |
IsConnected | Gets a value indicating whether the session is connected. |
IsSecured | Gets the value indicating whether the control connection is secured. |
LocalEndPoint | Gets the local client EndPoint. |
LogWriter | Gets or sets the LogWriter used by this object. Inherited from NetworkSession. |
Proxy | Gets or sets the network proxy to use to access a remote server. |
RemoteEndPoint | Gets the remote server EndPoint. |
ServerName | Gets the server name, if available. Inherited from NetworkSession. |
ServerPort | Gets the server port, if available. Inherited from NetworkSession. |
Settings | Gets or sets POP3 object settings. |
State | Gets the current state of the Pop3 object. |
SupportedExtensions | Gets the bit field specifying the extensions supported by the server. |
Timeout | Gets or sets the length of time in milliseconds before the operation times out (specify -1 or 0 to indicate that the request does not time out). |
TlsSocket | Returns the TLS/SSL socket of secured control connection. |
UserName | Gets the authenticated user name, if available. Inherited from NetworkSession. |
Version | Returns the version of the POP3 component. |
Methods
Name | Description |
---|---|
Abort() | Aborts the current operation. |
CheckConnectionState() | Checks whether the POP3 session is still connected. Throws an exception on error. |
Connect(String) | Connects to the POP3 server. |
Connect(String, SslMode) | Connects to the POP3 server with the specified security. Use a port corresponding to the specified security mode. |
Connect(String, Int32) | Connects to the POP3 server. |
Connect(String, Int32, SslMode) | Connects to the POP3 server with the specified security. |
ConnectAsync(String, SslMode, Object) | Begins asynchronous Connect operation. Connects to the POP3 server with the specified security. Use a port corresponding to the specified security mode. |
ConnectAsync(String, Int32, SslMode, Object) | Begins asynchronous Connect operation. Connects to the POP3 server with the specified security. |
ConnectAsync(String, Int32, Object) | Begins asynchronous Connect operation. Connects to the POP3 server. |
ConnectAsync(String, Object) | Begins asynchronous Connect operation. Connects to the POP3 server. |
Delete(Int32) | Marks a message as deleted. Messages marked as deleted will actually be deleted after a call to Disconnect() method. |
DeleteAsync(Int32, Object) | Begins asynchronous Delete operation. Marks a message as deleted. Messages marked as deleted will actually be deleted after a call to Disconnect() method. |
Disconnect() | Deletes any messages marked as deleted and terminates the connection. |
Disconnect(Boolean) | Deletes any messages marked as deleted and terminate the connection. |
DisconnectAsync(Boolean, Object) | Begins asynchronous Disconnect operation. Deletes any messages marked as deleted and terminate the connection. |
Dispose() | Disposes the Pop3 object and all the socket objects. |
Dispose(Boolean) | Releases the unmanaged resources used by the Pop3 and optionally releases the managed resources. |
Finalize() | Finalizer. Called by garbage collector during object destruction. |
GetConnectionState() | Checks whether the POP3 session is still connected and returns its state. |
GetHashCode() | Gets hash code for this object. Inherited from NetworkSession. |
GetMailboxSize() | Retrieve the size of the mailbox - the sum of lengths of all messages. |
GetMailboxSizeAsync(Object) | Begins asynchronous GetMailboxSize operation. Retrieve the size of the mailbox - the sum of lengths of all messages. |
GetMailMessage(Int32) | Downloads a message with a specified number from the server and loads it into an instance of MailMessage. |
GetMailMessageAsync(Int32, Object) | Begins asynchronous GetMailMessage operation. Downloads a message with a specified number from the server and loads it into an instance of MailMessage. |
GetMessage(Int32, Stream) | Downloads the message with a specified number from the server and writes its data into a supplied stream. |
GetMessage(Int32, String) | Downloads the message with a specified number from the server and writes its data into a local file. |
GetMessageAsync(Int32, Stream, Object) | Begins asynchronous GetMessage operation. Downloads the message with a specified number from the server and writes its data into a supplied stream. |
GetMessageAsync(Int32, String, Object) | Begins asynchronous GetMessage operation. Downloads the message with a specified number from the server and writes its data into a local file. |
GetMessageCount() | Retrieve the number of messages in the mailbox. |
GetMessageCountAsync(Object) | Begins asynchronous GetMessageCount operation. Retrieve the number of messages in the mailbox. |
GetMessageHeaders(Int32, Stream) | Downloads the headers of a message with a specified number from the server and writes it into a supplied stream. |
GetMessageHeadersAsync(Int32, Stream, Object) | Begins asynchronous GetMessageHeaders operation. Downloads the headers of a message with a specified number from the server and writes it into a supplied stream. |
GetMessageInfo(Int32, Pop3ListFields) | Gets information about a message with the specified sequence number. |
GetMessageInfoAsync(Int32, Pop3ListFields, Object) | Begins asynchronous GetMessageInfo operation. Gets information about a message with the specified sequence number. |
GetMessageList() | Retrieves a list of messages in the mailbox with unique IDs and lengths. |
GetMessageList(Pop3ListFields) | Retrieves a list of messages in the mailbox. |
GetMessageListAsync(Pop3ListFields, Object) | Begins asynchronous GetMessageList operation. Retrieves a list of messages in the mailbox. |
GetMessageSequenceNumber(String) | Converts a unique ID to sequence number. Returns the sequence number of the specified message, or null (Nothing in VB.NET) if not found. |
GetMessageSequenceNumberAsync(String, Object) | Begins asynchronous GetMessageSequenceNumber operation. Converts a unique ID to sequence number. Returns the sequence number of the specified message, or null (Nothing in VB.NET) if not found. |
GetMimeMessage(Int32) | Downloads a message with a specified number from the server and loads it into an instance of MimeMessage. |
GetMimeMessageAsync(Int32, Object) | Begins asynchronous GetMimeMessage operation. Downloads a message with a specified number from the server and loads it into an instance of MimeMessage. |
GetSupportedAuthenticationMethods() | Gets the list of supported authentication methods. |
Login(GssApiProvider) | Authenticates the user to the POP3 server using the specified GSSAPI provider. Only supported on Windows and partially on Mono. |
Login(Pop3Authentication) | Authenticates the user to the POP3 server using the specified authentication method that does not require credentials (NTLM or GSSAPI). Only supported on Windows. |
Login(String, Pop3Authentication) | Authenticates the user to the POP3 server using an OAuth token. |
Login(String, String) | Authenticates the user to the POP3 server. |
Login(String, String, Pop3Authentication) | Authenticates the user to the POP3 server using the specified authentication method. |
LoginAsync(GssApiProvider, Object) | Begins asynchronous Login operation. Authenticates the user to the POP3 server using the specified GSSAPI provider. Only supported on Windows and partially on Mono. |
LoginAsync(Pop3Authentication, Object) | Begins asynchronous Login operation. Authenticates the user to the POP3 server using the specified authentication method that does not require credentials (NTLM or GSSAPI). Only supported on Windows. |
LoginAsync(String, Pop3Authentication, Object) | Begins asynchronous Login operation. Authenticates the user to the POP3 server using an OAuth token. |
LoginAsync(String, String, Pop3Authentication, Object) | Begins asynchronous Login operation. Authenticates the user to the POP3 server using the specified authentication method. |
LoginAsync(String, String, Object) | Begins asynchronous Login operation. Authenticates the user to the POP3 server. |
OnCommandSent(Pop3CommandSentEventArgs) | Raises the CommandSent event. |
OnResponseRead(Pop3ResponseReadEventArgs) | Raises the ResponseRead event. |
OnStateChanged(Pop3StateChangedEventArgs) | Raises the StateChanged event. |
OnTransferProgress(Pop3TransferProgressEventArgs) | Raises the TransferProgress event. |
ReadResponse() | Returns a single line of response of the POP3 server to the command. |
ReadResponseAsync(Object) | Begins asynchronous ReadResponse operation. Returns a single line of response of the POP3 server to the command. |
Secure() | Secures the connection with TLS/SSL using default parameters. |
SecureAsync(Object) | Begins asynchronous Secure operation. Secures the connection with TLS/SSL using default parameters. |
SendCommand(String, Boolean) | Sends a custom command to the POP3 server. |
SendCommandAsync(String, Boolean, Object) | Begins asynchronous SendCommand operation. Sends a custom command to the POP3 server. |
SetSocketFactory(ISocketFactory) | Sets the socket factory to be used to create communication sockets. |
ToString() | Returns a string representation of this object. |
Undelete() | Unmarks any messages that have been marked as deleted. |
UndeleteAsync(Object) | Begins asynchronous Undelete operation. Unmarks any messages that have been marked as deleted. |
Events
Name | Description |
---|---|
CommandSent | Occurs when a command is send to the server. |
ResponseRead | Occurs when a response is received from the server. |
StateChanged | Occurs when the state of the Pop3 object is changed. |
TransferProgress | Occurs when data is send or received. |
ValidatingCertificate | Occurs when a server certificate needs to be validated. |