Class AttachmentBase

AttachmentBase class

Provides the base class for mail attachments and inline views. This abstract class supplies core functionality for managing attachment content, MIME parts, content identifiers, and resource disposal.

public abstract class AttachmentBase : IDisposable

Properties

NameDescription
ContentId { get; set; }Gets or sets the content id.
ContentStream { get; set; }Gets or sets the content stream.
ContentType { get; set; }Gets or sets the type of the content.
virtual Headers { get; }Gets headers collection of attachment.
TransferEncoding { get; set; }Gets or sets the transfer encoding.
UniqueId { get; }Gets or sets a unique identifier for the attachment that will be constant for each application run.

Methods

NameDescription
Dispose()Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
virtual Save(Stream)Saves the specified stream.
virtual Save(string)Saves the specified file name.

See Also