API Reference
EmailAttachment
Represents a file, inline resource, or embedded item attachment.
Inheritance
- Object
- EmailAttachment
Usage
Explore 9 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 4
- Property EmailAttachmentPatchChange.Attachment
- Property EmailDocument.Attachments
- Property EmailProtectionInfo.PayloadAttachment
- Property OutlookTaskCommunication.PayloadAttachment
Accepted by parameters 5
- Method EmailAttachmentPatch.Add
- Method EmailAttachmentPatch.Apply
- Method EmailAttachmentPatch.ReplaceAt
- Method EmailAttachmentPatch.Validate
- Method EmailAttachmentTextReader.Read
Constructors
public EmailAttachment() #Methods
public Stream OpenContentStream() #StreamOpens decoded attachment content without transferring ownership of the attachment.
public async Task<Stream> OpenContentStreamAsync(CancellationToken cancellationToken = default) #Task<Stream>Asynchronously opens decoded attachment content.
Parameters
- cancellationToken System.Threading.CancellationToken = default
Inherited Methods
public virtual Boolean Equals(Object? obj) #BooleanParameters
- obj Object?
Properties
public IDictionary<String, String> ContentTypeParameters { get; } #Declared MIME content-type parameters other than the attachment filename.
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 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 EmailAttachment.Content when both representations are present.
public EmailDocument? EmbeddedDocument { get; set; } #Embedded message or Outlook item when the attachment is structured.
public 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 EmailAttachment.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.