refactor: Remove MailKit and windream DMS dependencies

- Remove IDmsService interface (DMS integration deferred to Phase 5)
- Remove MailKitEmailService implementation
- Remove WindreamDmsService implementation
- Simplify IEmailService to SMTP-only operations
- Preparing for Limilabs Mail.dll migration

BREAKING CHANGE: IEmailService no longer supports IMAP/POP3 operations
Reason: Migrating from MailKit to Limilabs Mail.dll
This commit is contained in:
2026-07-22 11:48:19 +02:00
parent 751ef87506
commit dbd0d35ba3
4 changed files with 9 additions and 593 deletions

View File

@@ -1,11 +0,0 @@
namespace DigitalData.EmailProfiler.Application.Common.Interfaces;
/// <summary>
/// DMS service interface for windream integration.
/// </summary>
public interface IDmsService
{
Task<string> ImportDocumentAsync(string filePath, string objectType, Dictionary<string, string> metadata, CancellationToken cancellationToken = default);
Task<bool> DocumentExistsAsync(string documentId, CancellationToken cancellationToken = default);
Task<bool> UpdateMetadataAsync(string documentId, Dictionary<string, string> metadata, CancellationToken cancellationToken = default);
}

View File

@@ -3,14 +3,16 @@ using DigitalData.EmailProfiler.Application.Common.Dtos;
namespace DigitalData.EmailProfiler.Application.Common.Interfaces;
/// <summary>
/// Email service interface for IMAP/SMTP operations.
/// Implementation uses MailKit.
/// Throws AuthenticationFailedException when OAuth2/password auth fails.
/// Email service interface for SMTP operations.
/// Implementation uses Limilabs Mail.dll for production email sending.
/// SMTP configuration is injected via IOptions&lt;EmailAccountDto&gt; in appsettings.json.
/// Throws AuthenticationFailedException when SMTP authentication fails.
/// </summary>
public interface IEmailService
{
Task<IEnumerable<object>> ReceiveEmailsAsync(EmailAccountDto account, CancellationToken cancellationToken = default);
Task SendEmailAsync(EmailAccountDto account, string to, string subject, string body, bool isHtml = true, CancellationToken cancellationToken = default);
Task DeleteEmailAsync(EmailAccountDto account, int imapUid, CancellationToken cancellationToken = default);
Task<string> GetOAuth2TokenAsync(string tenantId, string clientId, string clientSecret, CancellationToken cancellationToken = default);
/// <summary>
/// Sends an email using the configured SMTP account.
/// SMTP credentials are configured in appsettings.json (EmailAccount section).
/// </summary>
Task SendEmailAsync(string to, string subject, string body, bool isHtml = true, CancellationToken cancellationToken = default);
}