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.aspNetMime.com Please note, for these examples you may need to change the Server, Username, and Password to reflect your situation.

Here is a list of the following examples:

aspNetMime Examples

These examples demonstrate the functionality of aspNetMime.

 

Creating an aspNetMime MimeMessage from the Filesystem

A simple example that uses a file stream from the filesystem to create an aspNetMime object.

Creating an aspNetMime MimeMessage from a string

A simple example that reads a stream into a string that is passed into the aspNetMime MimeMessage constructor.

Access Headers and X-Headers

An example demonstrating the GetHeader() and GetXHeader() methods.

Loop through the Mime Message Attachments and Embedded Images

An example that loops through the Attachment and EmbeddedPart collection of the aspNetMime object.

Stream an Attachment to the browser

An example that streams an attachment to the browser from an ASP.NET page.

    Stream an Embedded Image to the browser

    An example that streams an embedded image to the browser by using it's Content-ID.

    Stream Text to the browser

    An example that stream either the HTML part of TEXT part of a message to the browser

    Check a message for Spam

    Check to see if a message came from a blacklisted IP address.