ThunderbirdSummary Class
Reads and writes the summary files of the folders of Thunderbird (.msf), the Mork databases next to the mbox files of the folders.
public static class ThunderbirdSummaryExample
var messages = ThunderbirdSummary.ReadMessages(path);
var first = messages[0];
Assert.Equal("First", first.Subject);
Assert.Equal("first@example.com", first.MessageId);
Assert.Equal(new DateTimeOffset(2025, 7, 1, 8, 52, 37, TimeSpan.Zero), first.Date);
Assert.True(first.Flags.HasFlag(ThunderbirdMessageFlags.Read));
// The position of the message in the mbox file of the folder
Assert.Equal(421, messages[1].Offset);Methods
| Name | Description |
|---|---|
| Create(IEnumerable<ThunderbirdMessageSummary>) | Creates a summary of messages: a Mork database with a table of messages, with the columns Thunderbird reads. Thunderbird rebuilds a summary that does not match its folder. |
| ReadMessages(MorkDocument) | Returns the messages of a summary: the rows of its table of messages. |
| ReadMessages(string) | Returns the messages of a summary file. |
Create(IEnumerable<ThunderbirdMessageSummary>)
ThunderbirdSummary.csCreates a summary of messages: a Mork database with a table of messages, with the columns Thunderbird reads. Thunderbird rebuilds a summary that does not match its folder.
public static MorkDocument Create(IEnumerable<ThunderbirdMessageSummary> messages)Parameters
messagesIEnumerable<ThunderbirdMessageSummary>- The messages.
Returns
MorkDocument The summary.
ReadMessages overloads
ReadMessages(MorkDocument)
ThunderbirdSummary.csReturns the messages of a summary: the rows of its table of messages.
public static IEnumerable<ThunderbirdMessageSummary> ReadMessages(MorkDocument document)Parameters
documentMorkDocument- The summary.
Returns
IEnumerable<ThunderbirdMessageSummary> The messages.
ReadMessages(string)
ThunderbirdSummary.csReturns the messages of a summary file.
public static IReadOnlyList<ThunderbirdMessageSummary> ReadMessages(string path)Parameters
pathstring- The path of the
.msffile.
Returns
IReadOnlyList<ThunderbirdMessageSummary> The messages.
Exceptions
InvalidEmailDataException- The file is not a Mork database.
Constants
| Name | Description |
|---|---|
| MessagesRowScope | The scope of the rows of the messages. |
| MessagesTableKind | The kind of the table of the messages. |
MessagesRowScope
The scope of the rows of the messages.
public const string MessagesRowScope = "ns:msg:db:row:scope:msgs:all"MessagesTableKind
The kind of the table of the messages.
public const string MessagesTableKind = "ns:msg:db:table:kind:msgs"