API Reference

Class

EmailAttachment

Namespace OfficeIMO.Email
Assembly OfficeIMO.Email
Modifiers sealed

Represents a file, inline resource, or embedded item attachment.

Inheritance

  • Object
  • EmailAttachment

Usage

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Accepted by parameters

Constructors

Methods

public Stream OpenContentStream() #
Returns: Stream

Opens decoded attachment content without transferring ownership of the attachment.

public async Task<Stream> OpenContentStreamAsync(CancellationToken cancellationToken = null) #
Returns: Task<Stream>

Asynchronously opens decoded attachment content.

Parameters

cancellationToken System.Threading.CancellationToken = null optionalposition: 0

Properties

public String FileName { get; set; } #

Attachment filename.

public String ContentType { get; set; } #

Declared MIME content type.

public IDictionary<String, String> ContentTypeParameters { get; } #

Declared MIME content-type parameters other than the attachment filename.

public String ContentId { get; set; } #

Content-ID used by inline references.

public String ContentLocation { get; set; } #

Content location used by inline references.

public Boolean IsInline { get; set; } #

True when the source marks the attachment as inline.

public Boolean IsMimeRelated { get; set; } #

True when the source places this part inside the MIME related-resource set. Writers also infer related membership from exact HTML Content-ID and Content-Location references.

public Boolean IsHidden { get; set; } #

True when Outlook marks the attachment hidden.

public Boolean IsContactPhoto { get; set; } #

True when the attachment is the picture for an Outlook contact.

public Int32 RenderingPosition { get; set; } #

RTF rendering position, or -1 when not rendered in the body.

public Nullable<DateTimeOffset> CreatedDate { get; set; } #

Attachment creation timestamp.

public Nullable<DateTimeOffset> ModifiedDate { get; set; } #

Attachment modification timestamp.

public String LinkedPath { get; set; } #

Linked attachment path for by-reference attachment methods.

public Int64 Length { get; set; } #

Decoded payload length.

public Byte[] Content { get; set; } #

Decoded content when requested by reader options.

public IEmailContentSource ContentSource { get; set; } #

Reopenable decoded content used when retaining a byte array is undesirable. Writers prefer Content when both representations are present.

public EmailDocument EmbeddedDocument { get; set; } #

Embedded message or Outlook item when the attachment is structured.

public Nullable<Int32> MapiAttachMethod { get; set; } #

MSG attachment method, such as 1 for by-value or 5 for embedded message.

public IList<MapiProperty> MapiProperties { get; } #

Attachment-level MAPI properties.

public MapiPropertyBag Mapi { get; } #

Typed MAPI access backed by the exact MapiProperties collection.

public IDictionary<String, Byte[]> StructuredStorageStreams { get; } #

Relative CFB streams retained for an OLE, embedded MSG, or custom-storage attachment.

public IList<TnefAttribute> TnefAttributes { get; } #

Ordered raw attachment-level TNEF attributes.