Here are a few items to note about aspNetMime to help you get more familiar with its functionality.

What is aspNetMime?

 
aspNetMime is a .NET Email or MIME message parsing component, also known as an assembly. It is written in 100% C# for speed and efficiency. It does not have any dependencies on any unmanaged code. aspNetMime only requires the .NET framework to be installed on the computer.
 

Can I use aspNetMime in windows applications?

Absolutely! The name aspNetMime was chosen by the marketing division, but from a programmer’s perspective, you can use aspNetMime from a Windows Form application, web services, ASP.NET web pages, and any other .NET supported application.

What can aspNetMime do for me?

aspNetMime allows you to parse MIME messages. These messages can be downloaded from a mail server, found on the file system, or stream from a Database into aspNetMime.

 

 

aspNetMime Class Overview

There are 9 classes found in the aspNetMime assembly. They are

 

Class Description
Address A class representing an EmailAddress.
AddressCollection Basic collection class Headers.
Header Basic SMTP / MIME Header class. Includes a parameters collection for MIME headers.
HeaderCollection Basic collection class Headers.
Message Implements a aspNetMime Mime Part with common header values exposed as properties.
MimeException MimeException raised during parsing.
MimePart Implements a class for handling MIME message Body Parts.
MimePartCollection Implements a collection of aspNetMime Mime Parts.
Utility Utility class of methods for Encoding and Decoding Quoted-Printable and base64 text.

 

These classes can really be grouped into 3 seperate groups:
 

Workhorse Classes

    MimeMessage

    MimePart

    Header

    Address

    Utility

 

Collection Classes

    AddressCollection

    HeaderCollection

    MimePartCollection

 

Exception Class

    MimeException

 

These classes are discussed in more detail below.

 

Workhorse Classes

 

MimeMessage Class

The MimeMessage class, is the main message object. It contains general properties and methods than pertain to the entire MimeMessage.  Because the MimeMessage itself is a Mime Part, it inherits from the MimePart class.

 

MimePart Class

The MimePart class contains properties and methods for accessing different parts of individual MimePart.

 

Header Class

The header class is responsible for parsing the MimePart headers. Each header has Name, Value and Parameter properties, for accessing different parts of each header.

 

Address Class

The Address class is used for parsing email addresses into the individual name and 'actual' email address part.  Address classes are used in conjunction with headers.

 

Utility Class

The Utility class contains various methods for decoding base64 and quoted-printable MimeParts.

 

Collection Classes

 

AddressCollection

The AddressCollection class is a collection of addresses. The most common use of the AddressCollection class can be found in the MimeMessage properties MimeMessage.To and MimeMessage.CC. Each of properties return a collection of the email addresses found on the To line and CC line of an email message.

 

HeaderCollection

Each MimePart has a collection of headers. The individual headers can be accessed either by iterating over the collection, or using indexers.

 

MimePartCollection

The MimeMessage class contains multiple MimeParts. These MimeParts are returned, and accessed, as a MimePartCollection.

 

Exception Class

 

MimeException

When a malformed mime message is encountered, during parsing, the MimeException will be thrown.