Table of Contents

Class ReceivedMailBody

Namespace
Tharga.Team
Assembly
Tharga.Team.dll

A received mail made readable: its text, its formatting made safe, the images it shows in place and the files it carries.

public record ReceivedMailBody : IEquatable<ReceivedMailBody>
Inheritance
ReceivedMailBody
Implements
Inherited Members

Remarks

Read from the raw message every time, so nothing here is stored. The formatting has been through the one sanitizer — formatting, web and mail links, and images only by cid: reference, a remote image becoming its alt text — and a view sanitizes it again when it renders it.

Fields

MaxInlineImageBytes

The largest image Images carries; a larger one is only listed with the files.

public const long MaxInlineImageBytes = 2097152

Field Value

long

Properties

Attachments

Every file the mail carries, in order: attachments, images shown inside it, and forwarded mail as .eml.

public SupportAttachment[] Attachments { get; init; }

Property Value

SupportAttachment[]

Remarks

Each Id is the file's position in the mail, counted from 1.

Html

The formatting, sanitized, with cid: image references kept; null when the mail has none or nothing readable remains.

public string Html { get; init; }

Property Value

string

Images

The images Html names by Content-ID, of a type a browser shows without running anything and no larger than MaxInlineImageBytes, to show in their place.

public ReceivedMailImage[] Images { get; init; }

Property Value

ReceivedMailImage[]

MailId

public required string MailId { get; init; }

Property Value

string

Text

The text part, or the formatting rendered as text when the mail has none; empty when it has neither.

public required string Text { get; init; }

Property Value

string