Rebex
Products Downloads Buy Support Contact
Show / Hide Table of Contents

MailMessage Class

Namespace: Rebex.Mail
Assembly: Rebex.Mail.dll (version 7.0.9119)

Represents an e-mail message that can be saved, loaded, processed or sent.

Syntax
public class MailMessage
Inheritance
Object
MailMessage
Inherited Members
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Object.ToString()

Constructors

Name Description
MailMessage()

Initializes an instance of an empty e-mail message.

MailMessage(MimeMessage)

Initializes an instance of MailMessage using a MimeMessage.

Properties

Name Description
AlternateViews

Gets the collection of alternate forms of the message body.

Attachments

Gets the collection of attachments of this message.

Bcc

Gets or sets the list of addresses of recipients that are not to be revealed to other recipients of the message.

BodyHtml

Gets the HTML body of the message, or an empty string if it has no HTML body.

BodyText

Gets the text body of the message, or an empty string if it has no text body.

CanDecrypt

Gets a value indicating whether the message can be decrypted.

CC

Gets the list of addresses of others who are to receive the message.

CertificateFinder

Gets or sets the ICertificateFinder to be used to find certificates used to encrypt or sign the message.

Date

Gets or sets the origination date of this message. If origination date is not available, return the date specified by the first 'Received' header.

DefaultCharset

Gets or sets the default charset for MIME body and headers.

EncryptionAlgorithm

Gets an encryption algorithm used to encrypt an encrypted message.

EnvelopeId

Gets or sets the envelope identifier to be transmitted along with the message and included in any DSNs issued.

From

Gets or sets the list of authors of this message.

HasBodyHtml

Gets the value indicating whether the message has a HTML body.

HasBodyText

Gets the value indicating whether the message has a text body.

Headers

Gets the list of headers of this entity.

InReplyTo

Gets or sets the list of identifiers of messages to which the message is a reply.

IsDraft

Gets or sets a value indicating whether this mail is considered a Draft. This value indicates whether the message can be modified in e-mail clients.

IsEncrypted

Gets a value indicating whether the message is encrypted.

IsSigned

Gets a value indicating whether the message is signed.

MessageId

Gets or sets the unique identifier of the message.

Priority

Gets or sets the priority of the message.

ReadOnly

Gets a value indicating whether the message is read-only.

ReceivedDate

Gets the received date of this message.

Recipients

Gets the collection of recipients of an encrypted message.

References

Gets or sets the list of identifiers of messages in the same "thread" of conversation.

ReplyTo

Gets or sets the list of addresses that should receive replies to this message.

Resources

Gets the collection of embedded resources referred by message views.

Sender

Gets or sets the sender of this message.

Settings

Gets or sets MailMessage object settings.

Signers

Gets the collection of signers of a signed message.

Silent

Gets or sets a value indicating whether cryptographic providers are permitted to display any user interface (UI) when working with private keys.

Subject

Gets or sets the subject of the message.

To

Gets or sets the list of addresses of primary recipients of the message.

Methods

Name Description
Clone()

Creates a copy of this message.

CreateReply(MailAddress, ReplyBodyTransformation)

Creates a new message that is a reply to the current message.

CreateReply(MailAddress, ReplyBodyTransformation, MailReplyOptions)

Creates a new message that is a reply to the current message.

CreateReply(MailAddress, ReplyBodyTransformation, Boolean)

Creates a new message that is a reply to the current message.

Decrypt()

Decrypts an encrypted message, making the content accessible.

Encrypt(MailEncryptionAlgorithm, Certificate[])

Encrypts a message.

Encrypt(MailEncryptionAlgorithm, IEnumerable<Certificate>)

Encrypts a message.

Encrypt(MailEncryptionParameters, Certificate[])

Encrypts a message.

Encrypt(MailEncryptionParameters, IEnumerable<Certificate>)

Encrypts a message.

Encrypt(Certificate[])

Encrypts a message.

Encrypt(IEnumerable<Certificate>)

Encrypts a message.

Load(Byte[])

Loads a mail message from its byte array representation.

Load(Stream)

Loads a mail message from the supplied stream.

Load(String)

Loads a mail message from the supplied file.

RemoveSignature()

Removes a signature from a signed message.

Save(Stream)

Saves the mail message to the supplied stream in MIME format.

Save(Stream, MailFormat)

Saves the mail message to the supplied stream.

Save(String)

Saves the mail message to the supplied file in MIME format.

Save(String, MailFormat)

Saves the mail message to the supplied file.

Sign(MailSignatureParameters, Certificate[])

Signs a message.

Sign(MailSignatureParameters, IEnumerable<Certificate>)

Signs a message.

Sign(Certificate[])

Signs a message.

Sign(IEnumerable<Certificate>)

Signs a message.

ToByteArray()

Returns a byte array representation of the mail message. This is the same as the content of a file saved using the Save(String) message.

ToMimeMessage()

Converts a MailMessage to a MimeMessage.

ValidateSignature()

Validates all digital signatures on a signed message and validates all the signers' certificates.

ValidateSignature(MailSignatureValidationOptions)

Validates all digital signatures on a signed message. The specified validation options are taken into account.

ValidateSignature(MailSignatureValidationOptions, ValidationOptions, CertificateChainEngine)

Validates all digital signatures on a signed message with the specified engine. The specified validation options are taken into account.

ValidateSignature(Boolean, ValidationOptions)

Validates all digital signatures on a signed message. Optionally, signers' certificates are not validated, and the specified validation options are taken into account.

ValidateSignature(Boolean, ValidationOptions, CertificateChainEngine)

Validates all digital signatures on a signed message with the specified engine. Optionally, signers' certificates are not validated, and the specified validation options are taken into account.

Events

Name Description
ParsingHeader

Occurs when a MIME header is to be parsed.

UnparsableHeader

Occurs when an unparsable header is encountered while parsing a MIME message.

Operators

Name Description
Implicit(MimeMessage to MailMessage)

Converts a MimeMessage to a MailMessage.

In This Article
© REBEX ČR s.r.o. Back to top
Privacy policy
Manage cookies