Class UserMailEntity
One queued mail to a user and where it stands.
public record UserMailEntity : EntityBase, ISupportInitialize, IEquatable<PersistableEntityBase>, IEntity<ObjectId>, IEquatable<EntityBase<ObjectId>>, IEquatable<EntityBase>, IEquatable<UserMailEntity>
- Inheritance
-
PersistableEntityBaseEntityBase<ObjectId>EntityBaseUserMailEntity
- Implements
-
IEquatable<PersistableEntityBase>IEntity<ObjectId>IEquatable<EntityBase>
- Inherited Members
-
EntityBase.ToString()EntityBase.GetHashCode()EntityBase.Equals(EntityBase<ObjectId>)EntityBase.Equals(EntityBase)EntityBase.<Clone>$()EntityBase.EqualityContractEntityBase<ObjectId>.Equals(PersistableEntityBase)EntityBase<ObjectId>.IdPersistableEntityBase.NeedsCleaning()PersistableEntityBase.BeginInit()PersistableEntityBase.EndInit()PersistableEntityBase.CatchAll
Properties
Attachments
The files; always an array, so their content can be removed in one update once the mail is done.
public UserMailAttachmentEntity[] Attachments { get; init; }
Property Value
Attempts
How many times it has been claimed for sending.
public int Attempts { get; init; }
Property Value
BatchId
The batch whose content the mail carries, or null for a mail queued on its own.
[BsonIgnoreIfNull]
public string BatchId { get; init; }
Property Value
Body
The plain-text body.
public string Body { get; init; }
Property Value
BodyHtml
The sanitized HTML body, or null for a text-only mail.
[BsonIgnoreIfNull]
public string BodyHtml { get; init; }
Property Value
BouncedAt
When the report that it bounced was read, in UTC.
[BsonIgnoreIfNull]
public DateTime? BouncedAt { get; init; }
Property Value
Category
The category's key.
public required string Category { get; init; }
Property Value
ClaimedBy
Who holds it, while a sender does.
[BsonIgnoreIfNull]
public string ClaimedBy { get; init; }
Property Value
ClaimedUntil
When the holder's lease runs out, in UTC.
[BsonIgnoreIfNull]
public DateTime? ClaimedUntil { get; init; }
Property Value
CompletedAt
When it was sent, skipped or given up, in UTC; the retention period runs from here.
[BsonIgnoreIfNull]
public DateTime? CompletedAt { get; init; }
Property Value
DeduplicationKey
The deduplication key, unique where present.
[BsonIgnoreIfNull]
public string DeduplicationKey { get; init; }
Property Value
Kind
Which kind of mail it is, stored by name; null on a mail stored before kinds were, read as a message when it names a batch and as a mail otherwise.
[BsonIgnoreIfNull]
[BsonRepresentation(BsonType.String)]
public UserMailKind? Kind { get; init; }
Property Value
MessageId
The Message-ID it was sent with, which a bounce report names it by.
[BsonIgnoreIfNull]
public string MessageId { get; init; }
Property Value
NextAttemptAt
When it is next due, in UTC.
public DateTime NextAttemptAt { get; init; }
Property Value
QueuedAt
When it was queued, in UTC.
public DateTime QueuedAt { get; init; }
Property Value
Reason
Why it was skipped, failed or bounced, or why the last attempt did not succeed.
[BsonIgnoreIfNull]
public string Reason { get; init; }
Property Value
RecipientAddress
The address the mail is or was addressed to: the one it was queued with, or for a mail to a user the one on their record when it was sent, in lower case.
[BsonIgnoreIfNull]
public string RecipientAddress { get; init; }
Property Value
RecipientName
The name a mail queued to an address alone is addressed to.
[BsonIgnoreIfNull]
public string RecipientName { get; init; }
Property Value
RecipientUserKey
The key of the user the mail is for; null for a mail queued to an address alone.
public string RecipientUserKey { get; init; }
Property Value
Refused
Whether this records a mail the queue refused, which the mail log shows and a user's own history does not.
[BsonIgnoreIfDefault]
public bool Refused { get; init; }
Property Value
ReplyTo
The reply address the mail was queued with, or null.
[BsonIgnoreIfNull]
public string ReplyTo { get; init; }
Property Value
Status
Where the mail stands, stored by name.
[BsonRepresentation(BsonType.String)]
public UserMailStatus Status { get; init; }
Property Value
Subject
The subject line.
public required string Subject { get; init; }
Property Value
TeamKey
The key of the team the mail is about, or null when it belongs to none or to several.
[BsonIgnoreIfNull]
public string TeamKey { get; init; }