Click or drag to resize
MimeKit

MimeMessage Class

A MIME message.
Inheritance Hierarchy
SystemObject
  MimeKitMimeMessage

Namespace:  MimeKit
Assembly:  MimeKit (in MimeKit.dll) Version: 2.0.6.0
Syntax
C#
public class MimeMessage

The MimeMessage type exposes the following members.

Constructors
Properties
  NameDescription
Public propertyCode exampleAttachments
Gets the attachments.
Public propertyBcc
Gets the list of addresses in the Bcc header.
Public propertyBody
Gets or sets the body of the message.
Public propertyCode exampleBodyParts
Gets the body parts of the message.
Public propertyCc
Gets the list of addresses in the Cc header.
Public propertyDate
Gets or sets the date of the message.
Public propertyFrom
Gets the list of addresses in the From header.
Public propertyHeaders
Gets the list of headers.
Public propertyHtmlBody
Gets the html body of the message if it exists.
Public propertyImportance
Get or set the value of the Importance header.
Public propertyInReplyTo
Gets or sets the Message-Id that this message is in reply to.
Public propertyMessageId
Gets or sets the message identifier.
Public propertyMimeVersion
Gets or sets the MIME-Version.
Public propertyPriority
Get or set the value of the Priority header.
Public propertyReferences
Gets or sets the list of references to other messages.
Public propertyReplyTo
Gets the list of addresses in the Reply-To header.
Public propertyResentBcc
Gets the list of addresses in the Resent-Bcc header.
Public propertyResentCc
Gets the list of addresses in the Resent-Cc header.
Public propertyResentDate
Gets or sets the Resent-Date of the message.
Public propertyResentFrom
Gets the list of addresses in the Resent-From header.
Public propertyResentMessageId
Gets or sets the Resent-Message-Id header.
Public propertyResentReplyTo
Gets the list of addresses in the Resent-Reply-To header.
Public propertyResentSender
Gets or sets the address in the Resent-Sender header.
Public propertyResentTo
Gets the list of addresses in the Resent-To header.
Public propertySender
Gets or sets the address in the Sender header.
Public propertySubject
Gets or sets the subject of the message.
Public propertyTextBody
Gets the text body of the message if it exists.
Public propertyTo
Gets the list of addresses in the To header.
Public propertyXPriority
Get or set the value of the X-Priority header.
Top
Methods
  NameDescription
Public methodAccept
Dispatches to the specific visit method for this MIME message.
Public methodStatic memberCreateFromMailMessage
Creates a new MimeMessage from a MailMessage.
Public methodEncrypt
Encrypt the message to the sender and all of the recipients using the specified cryptography context.
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetTextBody
Gets the text body in the specified format.
Public methodGetType (Inherited from Object.)
Public methodStatic memberLoad(Stream, CancellationToken)
Load a MimeMessage from the specified stream.
Public methodStatic memberLoad(String, CancellationToken)
Load a MimeMessage from the specified file.
Public methodStatic memberLoad(Stream, Boolean, CancellationToken)
Load a MimeMessage from the specified stream.
Public methodStatic memberLoad(ParserOptions, Stream, CancellationToken)
Load a MimeMessage from the specified stream.
Public methodStatic memberLoad(ParserOptions, String, CancellationToken)
Load a MimeMessage from the specified file.
Public methodStatic memberLoad(ParserOptions, Stream, Boolean, CancellationToken)
Load a MimeMessage from the specified stream.
Public methodStatic memberLoadAsync(Stream, CancellationToken)
Asynchronously load a MimeMessage from the specified stream.
Public methodStatic memberLoadAsync(String, CancellationToken)
Asynchronously load a MimeMessage from the specified file.
Public methodStatic memberLoadAsync(Stream, Boolean, CancellationToken)
Asynchronously load a MimeMessage from the specified stream.
Public methodStatic memberLoadAsync(ParserOptions, Stream, CancellationToken)
Asynchronously load a MimeMessage from the specified stream.
Public methodStatic memberLoadAsync(ParserOptions, String, CancellationToken)
Asynchronously load a MimeMessage from the specified file.
Public methodStatic memberLoadAsync(ParserOptions, Stream, Boolean, CancellationToken)
Asynchronously load a MimeMessage from the specified stream.
Protected methodMemberwiseClone (Inherited from Object.)
Public methodPrepare
Prepare the message for transport using the specified encoding constraints.
Public methodSign(CryptographyContext)
Sign the message using the specified cryptography context and the SHA-1 digest algorithm.
Public methodSign(CryptographyContext, DigestAlgorithm)
Sign the message using the specified cryptography context and digest algorithm.
Public methodCode exampleSign(DkimSigner, IListHeaderId, DkimCanonicalizationAlgorithm, DkimCanonicalizationAlgorithm)
Digitally sign the message using a DomainKeys Identified Mail (DKIM) signature.
Public methodCode exampleSign(DkimSigner, IListString, DkimCanonicalizationAlgorithm, DkimCanonicalizationAlgorithm)
Digitally sign the message using a DomainKeys Identified Mail (DKIM) signature.
Public methodCode exampleSign(FormatOptions, DkimSigner, IListHeaderId, DkimCanonicalizationAlgorithm, DkimCanonicalizationAlgorithm)
Digitally sign the message using a DomainKeys Identified Mail (DKIM) signature.
Public methodCode exampleSign(FormatOptions, DkimSigner, IListString, DkimCanonicalizationAlgorithm, DkimCanonicalizationAlgorithm)
Digitally sign the message using a DomainKeys Identified Mail (DKIM) signature.
Public methodSignAndEncrypt(CryptographyContext)
Sign and encrypt the message to the sender and all of the recipients using the specified cryptography context and the SHA-1 digest algorithm.
Public methodSignAndEncrypt(CryptographyContext, DigestAlgorithm)
Sign and encrypt the message to the sender and all of the recipients using the specified cryptography context and the specified digest algorithm.
Public methodToString
Returns a String that represents the current MimeMessage.
(Overrides ObjectToString.)
Public methodCode exampleVerify(Header, IDkimPublicKeyLocator, CancellationToken)
Verify the specified DKIM-Signature header.
Public methodCode exampleVerify(FormatOptions, Header, IDkimPublicKeyLocator, CancellationToken)
Verify the specified DKIM-Signature header.
Public methodCode exampleVerifyAsync(Header, IDkimPublicKeyLocator, CancellationToken)
Asynchronously verify the specified DKIM-Signature header.
Public methodCode exampleVerifyAsync(FormatOptions, Header, IDkimPublicKeyLocator, CancellationToken)
Asynchronously verify the specified DKIM-Signature header.
Public methodWriteTo(Stream, CancellationToken)
Write the message to the specified output stream.
Public methodWriteTo(String, CancellationToken)
Write the message to the specified file.
Public methodWriteTo(Stream, Boolean, CancellationToken)
Write the message to the specified output stream.
Public methodWriteTo(FormatOptions, Stream, CancellationToken)
Write the message to the specified output stream.
Public methodWriteTo(FormatOptions, String, CancellationToken)
Write the message to the specified file.
Public methodWriteTo(FormatOptions, Stream, Boolean, CancellationToken)
Write the message to the specified output stream.
Public methodWriteToAsync(Stream, CancellationToken)
Asynchronously write the message to the specified output stream.
Public methodWriteToAsync(String, CancellationToken)
Asynchronously write the message to the specified file.
Public methodWriteToAsync(Stream, Boolean, CancellationToken)
Asynchronously write the message to the specified output stream.
Public methodWriteToAsync(FormatOptions, Stream, CancellationToken)
Asynchronously write the message to the specified output stream.
Public methodWriteToAsync(FormatOptions, String, CancellationToken)
Asynchronously write the message to the specified file.
Public methodWriteToAsync(FormatOptions, Stream, Boolean, CancellationToken)
Asynchronously write the message to the specified output stream.
Top
Operators
Remarks

A message consists of header fields and, optionally, a body.

The body of the message can either be plain text or it can be a tree of MIME entities such as a text/plain MIME part and a collection of file attachments.

See Also