Class MimePart
A binary attachment MIME entity (e.g. image/png, application/pdf).
The content is stored as decoded bytes.
Inherited Members
Namespace: DRIT.Mail.Rfc.Mime
Assembly: DRIT.Mail.dll
Syntax
public sealed class MimePart : MimeEntity
Constructors
View SourceMimePart(MimeHeaderCollection, ContentType, ContentDisposition?, string?, ContentTransferEncoding, byte[])
Initializes a new instance of the MimePart class.
Declaration
public MimePart(MimeHeaderCollection headers, ContentType contentType, ContentDisposition? contentDisposition, string? contentId, ContentTransferEncoding transferEncoding, byte[] content)
Parameters
| Type | Name | Description |
|---|---|---|
| MimeHeaderCollection | headers | |
| ContentType | contentType | |
| ContentDisposition | contentDisposition | |
| string | contentId | |
| ContentTransferEncoding | transferEncoding | |
| byte[] | content |
Properties
View SourceFileName
Gets the filename from Content-Disposition (or Content-Type name parameter), or null if not specified.
Declaration
public string? FileName { get; }
Property Value
| Type | Description |
|---|---|
| string |
IsAttachment
Gets a value indicating whether this part is an attachment.
Declaration
public bool IsAttachment { get; }
Property Value
| Type | Description |
|---|---|
| bool |
IsInline
Gets a value indicating whether this part is inline.
Declaration
public bool IsInline { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Methods
View SourceGetContent()
Gets the decoded content bytes.
Declaration
public byte[] GetContent()
Returns
| Type | Description |
|---|---|
| byte[] |