API Reference
EmailAttachment
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.
Returned or exposed by
- Property EmailAttachmentPatchChange.Attachment
- Property EmailDocument.Attachments
- Property EmailProtectionInfo.PayloadAttachment
- Property OutlookTaskCommunication.PayloadAttachment
Accepted by parameters
- Method EmailAttachmentPatch.Add
- Method EmailAttachmentPatch.Apply
- Method EmailAttachmentPatch.ReplaceAt
- Method EmailAttachmentPatch.Validate
Constructors
public EmailAttachment() #Methods
public Stream OpenContentStream() #StreamOpens decoded attachment content without transferring ownership of the attachment.
public async Task<Stream> OpenContentStreamAsync(CancellationToken cancellationToken = null) #Task<Stream>Asynchronously opens decoded attachment content.
Parameters
- cancellationToken System.Threading.CancellationToken = null
Inherited Methods
public override Boolean Equals(Object obj) #BooleanParameters
- obj Object
Properties
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 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 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.