Class ReferenceAttachment

ReferenceAttachment class

An attachment that is a link to a file in a cloud storage, such as OneDrive, instead of the file itself.

public class ReferenceAttachment : Attachment

Constructors

NameDescription
ReferenceAttachment()Initializes a new instance of ReferenceAttachment.
ReferenceAttachment(string)Initializes a new instance of the ReferenceAttachment class with the URL of the file.
ReferenceAttachment(Uri)Initializes a new instance of the ReferenceAttachment class with the URL of the file.

Properties

NameDescription
ContentDisposition { get; }Gets the Content-Disposition header of the attachment, which tells whether it is shown inline or as a file, and holds its file name and dates.
ContentId { get; set; }Gets or sets the content ID of the part, by which HTML refers to it with a cid: URL.
ContentStream { get; set; }Gets or sets the stream that holds the content.
ContentType { get; set; }Gets or sets the content type of the part: its media type, name and character set.
virtual Headers { get; }Gets the MIME headers of the part.
IsEmbeddedMessage { get; }Gets a value indicating whether the attachment is an attached e-mail message (message/rfc822).
IsTnef { get; }Gets a value indicating whether the attachment is a TNEF-encoded message (winmail.dat).
IsUri { get; }Gets a value indicating whether the attachment is a link to content elsewhere rather than the content itself.
Name { get; set; }Gets or sets the file name of the attachment.
NameEncoding { get; set; }Gets or sets the encoding used for the file name of the attachment in the headers.
PermissionType { get; set; }Gets or sets who can view or edit the linked file.
PreferredTextEncoding { get; set; }Gets or sets the encoding used for the text of the attachment when no other encoding is specified.
ProviderType { get; set; }Gets or sets the cloud storage service that holds the file.
TransferEncoding { get; set; }Gets or sets how the content is encoded for transfer, such as Base64 or quoted-printable.
UniqueId { get; }Gets an identifier of the part that stays the same while the application runs.
Uri { get; set; }Gets or sets the URL of the file.

Methods

NameDescription
Dispose()Releases the resources used by the part, including its content stream.
virtual Save(Stream)Saves the decoded content of the part to a stream.
virtual Save(string)Saves the decoded content of the part to a file.

See Also