API Reference
EmailMessage
A handle-free message view. Payload operations reopen its unchanged local source for their duration.
Inheritance
- Object
- EmailMessage
Usage
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by
- Property EmailMessageAttachment.Message
- Property EmailMessageReadResult.Messages
Methods
public EmailWriteResult Save(String path, Boolean overwrite = false, CancellationToken cancellationToken = default, EmailWriterOptions options = null) #EmailWriteResultExports a native email artifact with an atomic destination conflict policy.
Parameters
- path System.String
- overwrite System.Boolean = false
- cancellationToken System.Threading.CancellationToken = default
- options OfficeIMO.Email.EmailWriterOptions = null
public EmailAttachmentExtractionResult SaveAttachments(String directory, IEnumerable<Int32> indexes, CancellationToken cancellationToken = default, String fileNamePrefix = null) #EmailAttachmentExtractionResultExtracts selected top-level attachments through the bounded shared extractor.
Parameters
- directory System.String
- indexes System.Collections.Generic.IEnumerable{System.Int32}
- cancellationToken System.Threading.CancellationToken = default
- fileNamePrefix System.String = null
public T UseDocument<T>(Func<EmailDocument, T> operation, CancellationToken cancellationToken = default) #TRuns an owner operation with a full document and releases its source immediately afterward.
Type Parameters
- T
Parameters
- operation System.Func{OfficeIMO.Email.EmailDocument,``0}
- cancellationToken System.Threading.CancellationToken = default
Inherited Methods
Properties
public String Id { get; } #Stable item identifier within the source.
public String SourcePath { get; } #Absolute local source path.
public String FolderPath { get; } #Store folder path, or null for an individual file.
public String Subject { get; } #Message subject.
public EmailAddress From { get; } #Represented author.
public IReadOnlyList<EmailAddress> To { get; } #Primary recipients.
public IReadOnlyList<EmailAddress> Cc { get; } #Carbon-copy recipients.
public IReadOnlyList<EmailAddress> Bcc { get; } #Blind-carbon-copy recipients.
public Nullable<DateTimeOffset> Date { get; } #Declared sent date.
public Nullable<DateTimeOffset> ReceivedDate { get; } #Received date when available.
public String TextBody { get; } #Plain-text body alternative, when present.
public String HtmlBody { get; } #Original HTML body alternative, when present. Use the HTML exporter for a safe projection.
public String RtfBody { get; } #RTF body alternative, when present.
public IReadOnlyList<EmailMessageAttachment> Attachments { get; } #Attachment metadata; reading this collection does not retain payloads.
public EmailStoreItemContentAvailability ContentAvailability { get; } #Local-cache availability reported by the store reader; null for individual files.
public String ExportName { get; } #Portable subject and source-identity filename stem for batch exports.