Table of Contents

Class EmailAttachment

Namespace
Mailtrap.Attachments.Models
Assembly
Mailtrap.Abstractions.dll

Represents attachment metadata for email sent to sandbox.

public sealed record EmailAttachment : IEquatable<EmailAttachment>
Inheritance
EmailAttachment
Implements

Properties

AttachmentHumanSize

Gets attachment size in a human-readable format.

[JsonPropertyName("attachment_human_size")]
[JsonPropertyOrder(11)]
public string? AttachmentHumanSize { get; set; }

Property Value

string

Attachment size in a human-readable format.
E.g. '456 Bytes'.

AttachmentSize

Get attachment size.

[JsonPropertyName("attachment_size")]
[JsonPropertyOrder(8)]
public long? AttachmentSize { get; set; }

Property Value

long?

Attachment size.

AttachmentType

Gets disposition of the attachment.

[JsonPropertyName("attachment_type")]
[JsonPropertyOrder(4)]
public DispositionType? AttachmentType { get; set; }

Property Value

DispositionType

Attachment disposition.

ContentId

Gets attachment content identifier.

[JsonPropertyName("content_id")]
[JsonPropertyOrder(6)]
public string? ContentId { get; set; }

Property Value

string

Attachment content identifier.

ContentType

Gets MIME type of the attachment's content.

[JsonPropertyName("content_type")]
[JsonPropertyOrder(5)]
public string? ContentType { get; set; }

Property Value

string

MIME type of the attachment's content.

CreatedAt

Gets the timestamp when attachment was created.

[JsonPropertyName("created_at")]
[JsonPropertyOrder(9)]
public DateTimeOffset? CreatedAt { get; set; }

Property Value

DateTimeOffset?

Attachment creation timestamp.

DownloadPath

Gets download path for the attachment.

[JsonPropertyName("download_path")]
[JsonPropertyOrder(12)]
public string? DownloadPath { get; set; }

Property Value

string

Download path for the attachment.

FileName

Gets attachment file name.

[JsonPropertyName("filename")]
[JsonPropertyOrder(3)]
public string? FileName { get; set; }

Property Value

string

Attachment file name.

Id

Gets attachment identifier.

[JsonPropertyName("id")]
[JsonPropertyOrder(1)]
[JsonRequired]
public long Id { get; set; }

Property Value

long

Attachment identifier.

MessageId

Gets message identifier.

[JsonPropertyName("message_id")]
[JsonPropertyOrder(2)]
[JsonRequired]
public long MessageId { get; set; }

Property Value

long

Message identifier.

TransferEncoding

Gets transfer encoding of the attachment.

[JsonPropertyName("transfer_encoding")]
[JsonPropertyOrder(7)]
public string? TransferEncoding { get; set; }

Property Value

string

Transfer encoding of the attachment.

UpdatedAt

Gets the timestamp when attachment was updated.

[JsonPropertyName("updated_at")]
[JsonPropertyOrder(10)]
public DateTimeOffset? UpdatedAt { get; set; }

Property Value

DateTimeOffset?

Attachment last updated timestamp.