Table of Contents

Class EmailLogMessage

Namespace
Mailtrap.EmailLogs.Models
Assembly
Mailtrap.Abstractions.dll

Represents an email log message (list item or single message with events).

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

Properties

Category

Message category.

[JsonPropertyName("category")]
public string? Category { get; set; }

Property Value

string

ClicksCount

Number of clicks.

[JsonPropertyName("clicks_count")]
public int ClicksCount { get; set; }

Property Value

int

ClientIp

Client IP address.

[JsonPropertyName("client_ip")]
public string? ClientIp { get; set; }

Property Value

string

CustomVariables

Custom variables. May be null when the API omits or returns null.

[JsonPropertyName("custom_variables")]
[JsonObjectCreationHandling(JsonObjectCreationHandling.Populate)]
public IDictionary<string, object?>? CustomVariables { get; set; }

Property Value

IDictionary<string, object>

Events

Events for this message (single-message response only). May be null when the API omits or returns null.

[JsonPropertyName("events")]
[JsonObjectCreationHandling(JsonObjectCreationHandling.Populate)]
public IList<EmailLogMessageEvent>? Events { get; set; }

Property Value

IList<EmailLogMessageEvent>

From

Sender address.

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

Property Value

string

MessageId

Message identifier (UUID).

[JsonPropertyName("message_id")]
public string? MessageId { get; set; }

Property Value

string

OpensCount

Number of opens.

[JsonPropertyName("opens_count")]
public int OpensCount { get; set; }

Property Value

int

RawMessageUrl

Signed URL to download raw .eml message (single-message response only).

[JsonPropertyName("raw_message_url")]
public string? RawMessageUrl { get; set; }

Property Value

string

SendingDomainId

Sending domain ID.

[JsonPropertyName("sending_domain_id")]
public long? SendingDomainId { get; set; }

Property Value

long?

SendingStream

Sending stream.

[JsonPropertyName("sending_stream")]
public SendingStream SendingStream { get; set; }

Property Value

SendingStream

SentAt

When the message was sent.

[JsonPropertyName("sent_at")]
public DateTimeOffset? SentAt { get; set; }

Property Value

DateTimeOffset?

Status

Message status.

[JsonPropertyName("status")]
public EmailLogStatus Status { get; set; }

Property Value

EmailLogStatus

Subject

Subject line.

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

Property Value

string

TemplateId

Template ID.

[JsonPropertyName("template_id")]
public long? TemplateId { get; set; }

Property Value

long?

TemplateVariables

Template variables. May be null when the API omits or returns null.

[JsonPropertyName("template_variables")]
[JsonObjectCreationHandling(JsonObjectCreationHandling.Populate)]
public IDictionary<string, object?>? TemplateVariables { get; set; }

Property Value

IDictionary<string, object>

To

Recipient address.

[JsonPropertyName("to")]
public string? To { get; set; }

Property Value

string