Table of Contents

Class InboundThreadMessage

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

Represents a message inside a thread.
Only VisibilityStatus and Direction are guaranteed; Placeholder entries omit the rest.

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

Properties

Attachments

Gets the message attachments.

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

Property Value

IList<InboundAttachment>

Message attachments.

Bcc

Gets the blind carbon-copy addresses.

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

Property Value

IList<string>

Blind carbon-copy addresses.

BouncedAt

Gets or sets the timestamp when the message hard-bounced, if it did (outbound messages only).

[JsonPropertyName("bounced_at")]
public DateTimeOffset? BouncedAt { get; set; }

Property Value

DateTimeOffset?

Timestamp when the message hard-bounced.

Cc

Gets the carbon-copy addresses.

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

Property Value

IList<string>

Carbon-copy addresses.

CreatedAt

Gets or sets the timestamp when the message was created.

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

Property Value

DateTimeOffset?

Timestamp when the message was created.

DeliveredAt

Gets or sets the timestamp when the message was delivered (outbound messages only).

[JsonPropertyName("delivered_at")]
public DateTimeOffset? DeliveredAt { get; set; }

Property Value

DateTimeOffset?

Timestamp when the message was delivered.

DeliveryStatus

Gets or sets the delivery status (outbound messages only).

[JsonPropertyName("delivery_status")]
public EmailLogStatus? DeliveryStatus { get; set; }

Property Value

EmailLogStatus

Delivery status, or null for inbound messages.

Direction

Gets or sets the direction of the message.

[JsonPropertyName("direction")]
public ThreadMessageDirection Direction { get; set; }

Property Value

ThreadMessageDirection

Direction of the message.

EmailSize

Gets or sets the message size, in bytes.

[JsonPropertyName("email_size")]
public int? EmailSize { get; set; }

Property Value

int?

Message size, in bytes.

From

Gets or sets the sender address.

[JsonPropertyName("from")]
public string? From { get; set; }

Property Value

string

Sender address.

HtmlBody

Gets or sets the HTML body.

[JsonPropertyName("html_body")]
public string? HtmlBody { get; set; }

Property Value

string

HTML body.

Id

Gets or sets the message identifier.

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

Property Value

string

Message identifier.

InReplyTo

Gets or sets the RFC In-Reply-To header value.

[JsonPropertyName("in_reply_to")]
public string? InReplyTo { get; set; }

Property Value

string

RFC In-Reply-To header value.

MessageGroupId

Gets or sets the message group identifier (shared by a reply-all fan-out).

[JsonPropertyName("message_group_id")]
public string? MessageGroupId { get; set; }

Property Value

string

Message group identifier.

References

Gets the RFC References header values.

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

Property Value

IList<string>

RFC References header values.

ReplyTo

Gets or sets the reply-to address.

[JsonPropertyName("reply_to")]
public string? ReplyTo { get; set; }

Property Value

string

Reply-to address.

RfcMessageId

Gets or sets the RFC Message-ID header value.

[JsonPropertyName("rfc_message_id")]
public string? RfcMessageId { get; set; }

Property Value

string

RFC Message-ID header value.

Subject

Gets or sets the subject line.

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

Property Value

string

Subject line.

TextBody

Gets or sets the plain-text body.

[JsonPropertyName("text_body")]
public string? TextBody { get; set; }

Property Value

string

Plain-text body.

To

Gets the recipient addresses.

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

Property Value

IList<string>

Recipient addresses.

VisibilityStatus

Gets or sets the visibility status of the message.

[JsonPropertyName("visibility_status")]
public ThreadMessageVisibilityStatus VisibilityStatus { get; set; }

Property Value

ThreadMessageVisibilityStatus

Visibility status of the message.