Improved mailboxes to include sent mails and drafts (#1038)

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2026-10-10 10:48:54 +02:00
1 parent 67d44588d4
commit 5c319c45a0
31 files changed
+792 -103

No files matched your search

@@ -83,12 +83,23 @@ public readonly record struct DataSourceMailbox : IIndexedDataSource, ISecretId
/// </summary>
/// <remarks>
/// The full path as the server names it, including the server's own hierarchy delimiter. Empty
/// means the whole mailbox, apart from the trash and the junk folder.
/// means the whole mailbox, apart from the trash and the junk folder. The sent mails and the
/// drafts may come along from outside of it, see IncludeSentAndDrafts.
/// </remarks>
public string RootFolder { get; init; } = string.Empty;
/// <summary>
/// How far back the index reaches. Flagged mails are indexed regardless of their age.
/// Whether the folders for sent mails and for drafts are synchronized as well, when they lie outside the root folder.
/// </summary>
/// <remarks>
/// Without a root folder, both belong to the whole mailbox anyway. Only the folders the server
/// marks as such count, without their subfolders. A mailbox stored before this setting existed
/// loads with it switched on, so that its next sync fetches them.
/// </remarks>
public bool IncludeSentAndDrafts { get; init; } = true;
/// <summary>
/// How far back the index reaches. Flagged mails and drafts are indexed regardless of their age.
/// </summary>
public MailboxMaxAge MaxAge { get; init; } = MailboxMaxAge.LAST_12_MONTHS;
@@ -1,7 +1,7 @@
namespace AIStudio.Settings.DataModel;
/// <summary>
/// How far back the index of a mailbox reaches, by the date the server received a mail. Flagged mails are indexed regardless of their age.
/// How far back the index of a mailbox reaches, by the date the server received a mail. Flagged mails and drafts are indexed regardless of their age.
/// </summary>
public enum MailboxMaxAge
{