Skip to content
Dmitry Boyarintsev edited this page Nov 14, 2021 · 14 revisions

Namespace: AE.Net.Mail

The class name might come in conflict System.Net.Mail.MailMessage

Table of Contents

Public API

MessageID

The message ID, which can be used as the message reference in the client class calls

Subject

The subject (title) of the email

Addresses

The following properties of MailAddress are used to identify

  • To - the collection of recipients addresses
  • Sender - the sender of the message
  • From - the displayed from line. (could be different than Sender)
  • ReplyTo - reply to address that should be used when message is "Replied" in the client
  • Cc - the collection of carbon-copy address
  • Bcc - the collection of blind-carbon-copy address
All of them are based on MailAddress class.

It is safe to assume that these properties ALWAYS exist and doesn't need to be checked for null value. However, it's also possible that any collection might not contain ANY values.

Body

The property is not populated, if the message was received with headersonly flag set to true.

The textual representation of the body.

The body DOES NOT contain the entire raw message. Instead the raw body is being parsed into separate either Attachments or AlternativeView collections. The body would either include the "body" section or the first entry in "multipart/alternative" section of the email.

For the human readable representation, it's better to use the convenience methods of AlternateViews property.

AlternateViews

The property is not populated, if the message was received with headersonly flag set to true.

The collection of attachments that were marked as "AlternativeView". Such attachments contain the same message as the body of the email, but are used for a different representation. The typical use is to provide email in TEXT and HTML formats. AlternateViewCollection class, provides two convenience methods GetHtmlView() and GetTextView(). Both return an alternative-view attachement with mime type "text/html" and "text/plain" respectively.

Attachments

The property is not populated, if the message was received with headersonly flag set to true.

The collection of attachments that were not marked as an "AlternativeView", and are treated as (a file) attachments email

Clone this wiki locally