The following samples are written as console applications. However the code can easily be ported to a Windows Form application or an ASP.NET Application. For a more complete list of online examples, and downloadable code samples, visit www.aspNetPOP3.com Please note, for these examples you will need to change the Server, Username, and Password to reflect your situation.


Here is a list of the following examples:

POP3 Examples
These examples demonstrate the basic functionality of aspNetPOP3.

Connecting to a POP3 Server
A simple example that connects to a POP3 server and retrieves the number of messages available, and the size of the Inbox.

Downloading a Message
A simple example that downloads the first message of a POP3 server as text.

Deleting a Message
This example demonstrates how to delete a message and cancel any pending deletes.

Download Headers as an ArrayList
An example that downloads message headers as an ArrayList

Download Headers as a DataTable
This example downloads message headers as a DataTable.

Checking a Message for Spam
This example checks to see if a message has been blacklisted using the DNSbl servers.

Using aspNetPOP3 over SSL
This example demonstrates how to enable SSL for POP3.


Advanced Samples Demonstrating aspNetMime
These samples demonstrate aspNetPOP3 used in conjunction with aspNetMime. aspNetPOP3 can directly load a POP3 message into an aspNetMime MimeMessage. aspNetMime will then let you access any part of the email message in an Object Orientated fashion.

Referencing Headers Part I
A brief example of referencing different headers in a Mime MimeMessage (and checking for null).

Referencing Headers Part II
A brief example of referencing different headers in a Mime MimeMessage (and returning empty strings, instead of nulls).

Saving Attachments
An example of saving the attachments of an email to a directory.

Sending Images to an ASP.NET Response Stream
This examples writes embedded images to the response stream of an ASP.NET web page.

Creating a MimeReport
This example demonstrates how to scan a POP3 mailbox and turn it into a report.

For more information be sure to read the aspNetMime.chm file, installed with aspNetPOP3 or aspNetMime. The aspNetMime.chm file can also be downloaded at www.aspNetMime.com .