Table of Contents

Class InboundThread

Namespace
Mailtrap.Inbound.Models
Assembly
Mailtrap.Abstractions.dll

Represents a conversation thread.
Messages is populated on get-by-id; list items carry only the summary fields.

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

Properties

Attachments

Gets the attachments across the thread.

[JsonPropertyName("attachments")]
[JsonObjectCreationHandling(JsonObjectCreationHandling.Populate)]
public IList<InboundAttachment> Attachments { get; }

Property Value

IList<InboundAttachment>

Attachments across the thread.

FirstMessageAt

Gets or sets the timestamp of the thread's first message.

[JsonPropertyName("first_message_at")]
public DateTimeOffset? FirstMessageAt { get; set; }

Property Value

DateTimeOffset?

Timestamp of the thread's first message.

Id

Gets or sets the thread identifier.

[JsonPropertyName("id")]
public string? Id { get; set; }

Property Value

string

Thread identifier.

LastActivityAt

Gets or sets the timestamp of the thread's last activity.

[JsonPropertyName("last_activity_at")]
public DateTimeOffset? LastActivityAt { get; set; }

Property Value

DateTimeOffset?

Timestamp of the thread's last activity.

LastMessageId

Gets or sets the identifier of the thread's last message.

[JsonPropertyName("last_message_id")]
public string? LastMessageId { get; set; }

Property Value

string

Identifier of the thread's last message.

LastReceivedAt

Gets or sets the timestamp of the thread's last received message.

[JsonPropertyName("last_received_at")]
public DateTimeOffset? LastReceivedAt { get; set; }

Property Value

DateTimeOffset?

Timestamp of the thread's last received message.

LastSentAt

Gets or sets the timestamp of the thread's last sent message.

[JsonPropertyName("last_sent_at")]
public DateTimeOffset? LastSentAt { get; set; }

Property Value

DateTimeOffset?

Timestamp of the thread's last sent message.

MessageCount

Gets or sets the number of accessible messages in the thread.

[JsonPropertyName("message_count")]
public int? MessageCount { get; set; }

Property Value

int?

Number of accessible messages in the thread.

Messages

Gets the messages in the thread, oldest first (get-by-id only).

[JsonPropertyName("messages")]
[JsonObjectCreationHandling(JsonObjectCreationHandling.Populate)]
public IList<InboundThreadMessage> Messages { get; }

Property Value

IList<InboundThreadMessage>

Messages in the thread.

Recipients

Gets the distinct recipient addresses across the thread.

[JsonPropertyName("recipients")]
[JsonObjectCreationHandling(JsonObjectCreationHandling.Populate)]
public IList<string> Recipients { get; }

Property Value

IList<string>

Distinct recipient addresses.

Senders

Gets the distinct sender addresses across the thread.

[JsonPropertyName("senders")]
[JsonObjectCreationHandling(JsonObjectCreationHandling.Populate)]
public IList<string> Senders { get; }

Property Value

IList<string>

Distinct sender addresses.

Size

Gets or sets the combined size of the accessible messages, in bytes.

[JsonPropertyName("size")]
public int? Size { get; set; }

Property Value

int?

Combined size of the accessible messages, in bytes.

Subject

Gets or sets the subject of the thread's root message.

[JsonPropertyName("subject")]
public string? Subject { get; set; }

Property Value

string

Subject of the thread's root message.