Class UserMail
- Namespace
- Tharga.Team
- Assembly
- Tharga.Team.dll
A mail to one user, in one category, as it is handed to Tharga.Team.IUserMailQueue.
public sealed record UserMail : IEquatable<UserMail>
- Inheritance
-
UserMail
- Implements
- Inherited Members
Remarks
A user is named by key, not by address: the address is read from the user record when the mail is sent, as is whether the user still receives the category, so a change made after queuing is honoured. Only a mail in a required category may name an address alone, for someone who has no user record yet, such as a person invited to a team.
Properties
Attachments
Files sent with the mail, held in the queue until it is sent and within the configured limits.
public UserMailAttachment[] Attachments { get; init; }
Property Value
Body
The body as plain text; required when there is no HTML body.
public string Body { get; init; }
Property Value
BodyHtml
The body as HTML; sanitized when queued, and the text body is derived from it when none is given.
public string BodyHtml { get; init; }
Property Value
Category
The key of a registered category; an unknown key is refused when the mail is queued.
public required string Category { get; init; }
Property Value
DeduplicationKey
A key that makes queuing idempotent: a second mail with the same key is not queued again.
public string DeduplicationKey { get; init; }
Property Value
Kind
Which kind of mail it is, shown in the recipient's history; default Mail.
public UserMailKind Kind { get; init; }
Property Value
RecipientAddress
The address a mail with no user key goes to, accepted only in a required category; ignored when a user key is given.
public string RecipientAddress { get; init; }
Property Value
RecipientName
The name a mail with no user key is addressed to, or null.
public string RecipientName { get; init; }
Property Value
RecipientUserKey
The key of the user the mail is for; null only for a mail to RecipientAddress alone.
public string RecipientUserKey { get; init; }
Property Value
ReplyTo
Where replies go instead of the configured reply address; null uses the configured one.
public string ReplyTo { 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, such as the one an invitation is to, so the mail log can be filtered by organisation; null when it belongs to none or to several.
public string TeamKey { get; init; }