Class ImapMessageInfo
Information about a single message in an IMAP mailbox, as returned by FETCH (RFC 9051 §6.4.5). Immutable. Only the fields requested in ImapFetchOptions are populated; others are null/zero.
Inherited Members
Namespace: DRIT.Mail.Rfc.Imap
Assembly: DRIT.Mail.dll
Syntax
public sealed class ImapMessageInfo
Constructors
View SourceImapMessageInfo(long, long, ImapMessageFlags, DateTimeOffset?, long, MimeMessage?, IReadOnlyList<MimeHeader>?)
Initializes a new instance of the ImapMessageInfo class.
Declaration
public ImapMessageInfo(long sequenceNumber, long uid, ImapMessageFlags flags, DateTimeOffset? internalDate, long size, MimeMessage? envelope, IReadOnlyList<MimeHeader>? headers)
Parameters
| Type | Name | Description |
|---|---|---|
| long | sequenceNumber | |
| long | uid | |
| ImapMessageFlags | flags | |
| DateTimeOffset? | internalDate | |
| long | size | |
| MimeMessage | envelope | |
| IReadOnlyList<MimeHeader> | headers |
Properties
View SourceEnvelope
Gets the parsed envelope (headers only), or null if not fetched.
Declaration
public MimeMessage? Envelope { get; }
Property Value
| Type | Description |
|---|---|
| MimeMessage |
Flags
Gets the message flags.
Declaration
public ImapMessageFlags Flags { get; }
Property Value
| Type | Description |
|---|---|
| ImapMessageFlags |
Headers
Gets the parsed headers from BODY.PEEK[HEADER], or null
if not fetched.
Declaration
public IReadOnlyList<MimeHeader>? Headers { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<MimeHeader> |
InternalDate
Gets the internal date (when the message was received by the server), or null if not fetched.
Declaration
public DateTimeOffset? InternalDate { get; }
Property Value
| Type | Description |
|---|---|
| DateTimeOffset? |
SequenceNumber
Gets the 1-based sequence number. Valid only while the mailbox is selected and no EXPUNGE has renumbered messages.
Declaration
public long SequenceNumber { get; }
Property Value
| Type | Description |
|---|---|
| long |
Size
Gets the message size in bytes, or 0 if not fetched.
Declaration
public long Size { get; }
Property Value
| Type | Description |
|---|---|
| long |
Uid
Gets the unique identifier, or 0 if not fetched. Stable across
sessions if UIDVALIDITY is unchanged.
Declaration
public long Uid { get; }
Property Value
| Type | Description |
|---|---|
| long |