• DR-IT Software
  • Products
  • Documentation
  • Product page
  • Examples
  • API reference
  • Support
Show / Hide Table of Contents

Class MimeAttachment

A convenience wrapper for a MIME attachment, providing easy access to the filename, content ID, content type, and decoded content bytes.

Inheritance
object
MimeAttachment
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
Namespace: DRIT.Mail.Rfc.Mime
Assembly: DRIT.Mail.dll
Syntax
public sealed class MimeAttachment

Constructors

View Source

MimeAttachment(string?, string?, ContentType, byte[], bool)

Initializes a new instance of the MimeAttachment class.

Declaration
public MimeAttachment(string? fileName, string? contentId, ContentType contentType, byte[] content, bool isInline)
Parameters
Type Name Description
string fileName
string contentId
ContentType contentType
byte[] content
bool isInline

Properties

View Source

ContentId

Gets the Content-ID of the attachment (for inline references), or null if not specified.

Declaration
public string? ContentId { get; }
Property Value
Type Description
string
View Source

ContentType

Gets the Content-Type of the attachment.

Declaration
public ContentType ContentType { get; }
Property Value
Type Description
ContentType
View Source

FileName

Gets the filename of the attachment, or null if not specified.

Declaration
public string? FileName { get; }
Property Value
Type Description
string
View Source

IsInline

Gets a value indicating whether this is an inline attachment.

Declaration
public bool IsInline { get; }
Property Value
Type Description
bool

Methods

View Source

GetContent()

Gets the decoded content bytes of the attachment.

Declaration
public byte[] GetContent()
Returns
Type Description
byte[]
  • View Source
Back to top

DR-IT Software documentation

DR-IT Software · Products · Documentation index · Product page · Downloads · Support · Licensing

Generated by DocFX