From a57429718dd0f950c8ed81fba4a48c1ca106dd9c Mon Sep 17 00:00:00 2001 From: TekH Date: Mon, 17 Aug 2026 10:14:44 +0200 Subject: [PATCH] feat(application): extend DTOs with POP3/OAuth2 fields and add IMAP append flags to SendingEmailEvent --- .../Dto/EmailAccounts/EmailAccountDto.cs | 10 ++++++++++ .../EmailAccountModificationDto.cs | 12 +++++++++++ .../Common/Dto/SendingEmailEvent.cs | 20 ++++++++++++++++++- 3 files changed, 41 insertions(+), 1 deletion(-) diff --git a/src/core/DigitalData.MessagingService.Application/Common/Dto/EmailAccounts/EmailAccountDto.cs b/src/core/DigitalData.MessagingService.Application/Common/Dto/EmailAccounts/EmailAccountDto.cs index a531a42..5ab16f6 100644 --- a/src/core/DigitalData.MessagingService.Application/Common/Dto/EmailAccounts/EmailAccountDto.cs +++ b/src/core/DigitalData.MessagingService.Application/Common/Dto/EmailAccounts/EmailAccountDto.cs @@ -43,4 +43,14 @@ public record EmailAccountDto /// Use SSL/TLS when connecting to the IMAP server. /// public bool ImapUseSsl { get; set; } = true; + + public string? Pop3Server { get; set; } + + public int Pop3Port { get; set; } = 995; + + public bool Pop3UseSsl { get; set; } = true; + + public string? OAuth2ClientId { get; set; } + + public string? OAuth2TenantId { get; set; } } \ No newline at end of file diff --git a/src/core/DigitalData.MessagingService.Application/Common/Dto/EmailAccounts/EmailAccountModificationDto.cs b/src/core/DigitalData.MessagingService.Application/Common/Dto/EmailAccounts/EmailAccountModificationDto.cs index 6f2baa1..4775dd0 100644 --- a/src/core/DigitalData.MessagingService.Application/Common/Dto/EmailAccounts/EmailAccountModificationDto.cs +++ b/src/core/DigitalData.MessagingService.Application/Common/Dto/EmailAccounts/EmailAccountModificationDto.cs @@ -44,4 +44,16 @@ public record EmailAccountModificationDto /// Use SSL/TLS when connecting to the IMAP server. /// public bool ImapUseSsl { get; set; } = true; + + public string? Pop3Server { get; set; } + + public int Pop3Port { get; set; } = 995; + + public bool Pop3UseSsl { get; set; } = true; + + public string? OAuth2ClientId { get; set; } + + public string? OAuth2ClientSecret { get; set; } + + public string? OAuth2TenantId { get; set; } } \ No newline at end of file diff --git a/src/core/DigitalData.MessagingService.Application/Common/Dto/SendingEmailEvent.cs b/src/core/DigitalData.MessagingService.Application/Common/Dto/SendingEmailEvent.cs index 5eadad2..b4bf498 100644 --- a/src/core/DigitalData.MessagingService.Application/Common/Dto/SendingEmailEvent.cs +++ b/src/core/DigitalData.MessagingService.Application/Common/Dto/SendingEmailEvent.cs @@ -19,4 +19,22 @@ public record SendingEmailEvent #else public required DateTime QueuedAt { get; init; } #endif -} \ No newline at end of file + + /// + /// When true, the sent message will be appended to the IMAP Sent folder after sending. + /// +#if NETFRAMEWORK + public bool UseImapAppend { get; set; } = false; +#else + public bool UseImapAppend { get; init; } = false; +#endif + + /// + /// IMAP folder to append the sent message to (used when is true). + /// +#if NETFRAMEWORK + public string SentFolder { get; set; } = "Sent"; +#else + public string SentFolder { get; init; } = "Sent"; +#endif +}