Dela via


EmailMessage Class

Definition

Represents an email message.

public ref class EmailMessage sealed
/// [Windows.Foundation.Metadata.Activatable(65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class EmailMessage final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
class EmailMessage final
[Windows.Foundation.Metadata.Activatable(65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class EmailMessage
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
public sealed class EmailMessage
function EmailMessage()
Public NotInheritable Class EmailMessage
Inheritance
Object Platform::Object IInspectable EmailMessage
Attributes

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)
App capabilities
email emailSystem

Remarks

For an example of using this class, see Send email.

Version history

Windows version SDK version Value added
1511 10586 SmimeData
1511 10586 SmimeKind
1703 15063 ReplyTo
1703 15063 SentRepresenting

Constructors

EmailMessage()

Creates an instance of the EmailMessage class.

Properties

AllowInternetImages

Gets or sets a Boolean value indicating whether images may be embedded in the html encoded email message.

Attachments

Gets the attachments of the email message.

Bcc

Gets the recipients BCC'd to the email message.

Body

Gets or sets the body of the email message.

CC

Gets the recipients CC'd to the email message.

ChangeNumber

Gets the current change number which is incremented for each change made to an email message.

ConversationId

Gets the identifier for a conversation.

DownloadState

Gets or sets the download status of an email message.

EstimatedDownloadSizeInBytes

Gets or sets the estimated size, in bytes, of an email message download.

FlagState

Represents the flag status of an email message.

FolderId

Gets the identifier of a folder in the inbox.

HasPartialBodies

Gets a Boolean value indicating whether this email message contains partial bodies.

Id

Gets the identifier of an email message.

Importance

Gets the importance of an email message.

InResponseToMessageId

Gets the identifier for the email message to which this message is a response.

IrmInfo

Gets or sets the Information Rights Management (IRM) information for this email message.

IsDraftMessage

Gets a Boolean value indicating whether this message is a draft.

IsRead

Gets a Boolean value indicating whether the email message has been read.

IsSeen

Gets a Boolean value indicating whether the email message has been seen.

IsServerSearchMessage

Gets a Boolean value indicating whether the email message is a temporary server search message.

IsSmartSendable

Gets a Boolean value indicating whether the response email message is allowed to attempt a smart send, only sending that portion of the email message that has changed.

LastResponseKind

Gets the last kind of response sent in reference to this email message.

MailboxId

Gets the identifier of the mailbox.

MeetingInfo

Gets the information associated with this meeting.

MessageClass

Gets or sets a string that indicates the class of the message.

NormalizedSubject

Gets the subject line of an email message stripped of additional prefixes such as fwd: and re:

OriginalCodePage

Gets or sets the integer that identifies the original flavor of the character set used so that when the email message is condensed from wide character format (16-bit) to ASCII or other 8-bit encoding, in cases of later encoding questions, this integer can be used to recreate the original character set.

Preview

Gets or sets the short preview string that represents the longer email message in the list view of emails.

RemoteId

Gets or sets the identifier that can be used by a service provider to access the email message on the client machine.

ReplyTo

Gets the recipients that are configured to receive a reply to the email message.

Sender

Gets or sets the mailbox from which the email message was sent.

SentRepresenting

Gets or sets an object that identifies the name and address of the person sending the message.

SentTime

Gets or sets the time an email was sent.

SmimeData

Gets or sets the S/MIME data associated with an email message. For more information, see the Certificate class.

SmimeKind

Gets or sets the type of S/MIME encryption/signature for the email message.

Subject

Gets or sets the subject of the email message.

To

Gets the direct recipients of the email message.

Methods

GetBodyStream(EmailMessageBodyKind)

Gets the requested email stream such as plain text or HTML.

SetBodyStream(EmailMessageBodyKind, IRandomAccessStreamReference)

Sets the value of the specified body stream in an email message.

Applies to