Class AmpMessage

AmpMessage class

Message which allows senders to include AMP components inside emails.

public class AmpMessage : MailMessage

Constructors

NameDescription
AmpMessage()Initializes a new instance of the MailMessage class

Properties

NameDescription
virtual AlternateViews { get; }Gets the alternate views of the body: the plain-text, HTML and other versions.
virtual AmpHtmlBody { get; set; }Gets the AmpHtml representation of message’s body.
virtual Attachments { get; }Gets the attachments of the message.
virtual Bcc { get; set; }Gets or sets the BCC recipients.
virtual Body { get; set; }Gets or sets the plain-text body. When the message has no plain-text part, the text of HtmlBody without the HTML markup is returned.
virtual BodyEncoding { get; set; }Gets or sets the character encoding of the body.
BodyType { get; }Gets the format of the body: plain text, HTML or RTF.
virtual CC { get; set; }Gets or sets the CC recipients.
virtual Date { get; set; }Gets or sets the date and time of the message (the Date header).
virtual DeliveryNotificationOptions { get; set; }Gets or sets when the SMTP server sends a delivery status notification to the sender.
Epilogue { get; set; }Gets or sets the text after the last MIME boundary of the message.
virtual From { get; set; }Gets or sets the author of the message (the From header).
virtual Headers { get; }Gets the headers of the message.
virtual HtmlBody { get; set; }Gets or sets the HTML body.
virtual IsBodyHtml { get; set; }Gets or sets a value indicating whether the body is HTML.
virtual IsDraft { get; set; }Gets or sets a value indicating whether the message is a draft that has not been sent (the X-Unsent header).
virtual IsEncrypted { get; }Gets a value indicating whether the message is encrypted (S/MIME).
virtual IsReadOnly { get; }Gets a value indicating whether the message is read-only, as a signed copy is.
virtual IsSigned { get; }Gets a value indicating whether the message is digitally signed.
virtual ItemId { get; }Gets the identifiers of the message in the mailbox it was retrieved from.
virtual LinkedResources { get; }Gets the resources embedded in the HTML body, such as images.
virtual MessageId { get; set; }Gets or sets the unique identifier of the message (the Message-ID header).
virtual OriginalIsTnef { get; }Gets a value indicating whether the message was loaded from TNEF data (winmail.dat).
Preamble { get; set; }Gets or sets the text before the first MIME boundary, usually a note for mail clients that do not support MIME.
PreferredTextEncoding { get; set; }Gets or sets the encoding used for all text of the message when no other encoding is specified.
virtual Priority { get; set; }Gets or sets the priority of the message: normal, low or high.
ReadReceiptTo { get; set; }Gets or sets the addresses a read receipt is requested to (the Disposition-Notification-To header).
virtual ReplyToList { get; set; }Gets or sets the addresses replies should go to (the Reply-To header).
virtual ReversePath { get; set; }Gets or sets the address bounces are returned to (the Return-Path header). When the message is sent, it is used as the envelope sender in preference to Sender and From.
virtual Sender { get; set; }Gets or sets the agent that sent the message on behalf of the author (the Sender header).
virtual Sensitivity { get; set; }Gets or sets the sensitivity of the message: personal, private or company confidential.
virtual Subject { get; set; }Gets or sets the subject of the message.
virtual SubjectEncoding { get; set; }Gets or sets the character encoding of the subject.
TimeZoneOffset { get; set; }Gets or sets the offset from UTC that the dates of the message are written with.
virtual To { get; set; }Gets or sets the To recipients.
virtual XMailer { get; set; }Gets or sets the software that created the message (the X-Mailer header).

Methods

NameDescription
virtual AddAlternateView(AlternateView)Adds an alternate view of the body to the message.
AddAmpComponent(AmpComponent)Add Amp component to this message.
virtual AddAttachment(Attachment)Adds an attachment to the message.
virtual AttachSignature(CmsSigner)Creates a signed copy of the message (S/MIME). The copy is read-only.
virtual AttachSignature(X509Certificate2)Creates a signed copy of the message (S/MIME). The copy is read-only.
virtual AttachSignature(CmsSigner, bool)Creates a signed copy of the message (S/MIME). The copy is read-only.
virtual AttachSignature(X509Certificate2, bool)Creates a signed copy of the message (S/MIME). The copy is read-only.
virtual CheckBounced()Checks whether the message is a bounce (a non-delivery report) and, if so, why it bounced.
virtual CheckSignature()Verifies the signature of the message.
virtual Clone()Creates a copy of the message.
CreateReadReceipt(string, string)Creates a read receipt for the message.
virtual Decrypt()Decrypts the message with a certificate found in the certificate store.
virtual Decrypt(X509Certificate2)Decrypts the message with the specified certificate.
Dispose()Releases the resources used by the message, including its attachments.
virtual Encrypt(X509Certificate2)Creates a copy of the message encrypted for one recipient (S/MIME).
virtual Encrypt(X509Certificate2[])Creates a copy of the message encrypted for several recipients (S/MIME).
override Equals(object)Determines whether the specified object is equal to this message.
GetAlternateViewContent(string)Gets the content of the alternate view of the specified media type.
GetEnumerator()Returns an enumerator that iterates through a collection.
override GetHashCode()Returns the hash code of the message.
virtual GetHtmlBodyText(bool)Gets the text of the HTML body without the markup.
virtual GetHtmlBodyText(HyperlinkRenderingCallback)Gets the text of the HTML body without the markup, rendering hyperlinks with a custom method.
virtual Import(Stream)Replaces the content of this message with a message read from a stream in EML format.
RecomposeTnefContent()Rebuilds the TNEF attachment (winmail.dat) of a message that was loaded from TNEF, so that it reflects the changes made to the message.
virtual RemoveSignature()Returns a copy of a signed message without the signature.
virtual Save(Stream)Saves the message to a stream in EML format.
virtual Save(string)Saves the message to a file in EML format, whatever the file extension.
override Save(Stream, SaveOptions)Save message as a stream
virtual Save(string, SaveOptions)Saves the message to a file in the format selected by the options.
virtual SetHtmlBody(string, bool)Sets the HTML body, optionally detecting its encoding.
override ToString()Returns a string that represents the message.

See Also