Version: 3.2.1.0
Send, receive, edit, sign/verify and encrypt/decrypt email messages in any .NET application or service. 

Pop .NET Component

Use the secure Pop component to integrate Post Office Protocol (POP3) functionality into any .NET application, allowing your application to easily download Internet email from any POP3 server. Features include:

  • Select secure (SSL 2.0, SSL 3.0, PCT, TLS) or unencrypted TCP communications.
  • Easy session management. Default behavior is to login, get all messages, and automatically log out.
  • Flexible message retrieval. Get all messages at once, or one at a time. Get an entire message, or only the header, or only a specified amount of lines.
  • Stream support. Attachments can be decoded and stored as FileStreams (making it easy to save to a file) or they can be decoded and stored as MemoryStreams (making it easy to use the data within your application without using a temp file).
  • Advanced attachment decoding. Attachments are decoded on-the-fly, making your application faster and more efficient.
  • Get mail synchronously or asynchronously.
  • Decrypt Secure MIME (S/MIME) messages.
  • Progress event reports the current status of operations.
  • Send ANY command to the server using the exposed TCP connection.
  • Trace event exposes the underlying TCP communication.
  • C# and VB.NET sample projects are included.
  • Integrates with all versions of Visual Studio and supports C#, VB.NET, ASP.NET, Delphi 8, C# Builder, and other .NET compliant development environments.

Looking for the ActiveX version of this component?

Interface

Public Constructors
Pop Overloaded. Initialize a new instance of the Pop class.
Public Properties
AutoDelete Controls the setting of the message "delete flag" when downloading messages.
AutoGet Set this property to control automatic message retrieval.
AutoLogout Controls automatic log out after all communication with the POP server is complete.
AutoLogout Controls automatic log out after all communication with the POP server is complete.
AutoSize When true, PopMessage.Size is initialized during login.
AutoUid When true, the unique ID for each message is retrieved during login.
Busy Returns true if a method is currently in use.
Certificate Gets or sets the certificate to use for client-side authentication.
Connected Gets the connected state of the connection.
Connection Gets the Tcp component instance used for the connection.
DoEvents Gets or sets a value that controls the processing of events during blocking method calls.
Editor In Visual Studio.NET, displays an interactive form to use to test real time protocol operations.
Messages An array of PopMessage objects used to manipulate messages.
Size Returns the number of bytes contained in all messages present.
Timeout Specifies the maximum number of milliseconds to wait for responses to commands or time between data buffer transfers.
UseAuthentication Gets or sets a value that indicates whether the received server certificate should be authenticated.
UseMemoryStreams Controls whether attachments are decoded and stored as FileStreams or as MemoryStreams when a message is retrieved.
Public Methods
BeginLogin Overloaded. Asynchronously log in to a POP server and initialize the PopMessage array
BeginLogout Asynchronously ceases all activity and gracefully closes the connection.
Dispose Releases all resources associated with the object.
Login Overloaded. Synchronously log in to a POP server and initialize the PopMessage array.
Logout Ceases all activity and gracefully closes the control connection.
Public Events
BusyChanged Raised when the value of the Object.Busy property changes.
CertificateReceived Raised when the server's certificate is received.
CertificateRequested Raised when the server is requesting a client certificate.
ConnectedChanged Raised when the value of the Object.Connected property changes.
EndGet Raised when the PopMessage.BeginGet request completes.
EndLogin Raised when the Pop.BeginLogin request completes.
EndLogout Raised when the Pop.BeginLogout request completes.
Progress Raised repeatedly while an email message is retrieved.
Trace Raised when data has been sent/received.

Code Example

How easily is the Pop component used? The following example demonstrates logging into a POP server, getting all messages, and saving all attachments to a directory.

VB.NET Example
' Login to the POP server. Once this method returns, all messages will have been retrieved.
Pop1.Login("mail.myserver.com", "test", "pass")

' Save all attachments.
Dim msg As PopMessage
For Each msg In Pop1.Messages
   Dim att As AttachmentStream
   For Each att In msg.Message.Attachments
      Dim filename As String = "C:\temp\" & att.FileName
      att.Save(filename, true)
   Next
Next