#if NET using DigitalData.MessagingService.Application.Common.Dto; using DigitalData.MessagingService.Domain.Entities; namespace DigitalData.MessagingService.Application.Common.Interfaces; /// /// Service interface for reading emails via IMAP. /// public interface IImapEmailService { /// /// /// /// /// /// /// Task SyncEmailsAsync( EmailAccount account, string folder = "INBOX", CancellationToken cancel = default); /// /// Marks a message as seen (read) on the server. /// Task MarkAsSeenAsync( EmailAccount account, long uid, string folder = "INBOX", CancellationToken cancellationToken = default); /// /// Gets the last IMAP sync date for the specified account and folder. /// /// /// /// DateTime? GetLastImapSyncDate(int accountId, string folder = "INBOX"); /// /// Sends an email via SMTP using the account credentials and appends the sent message /// to the account's IMAP Sent Items folder. /// Task SendAndAppendAsync( EmailContext context, string sentFolder = "Sent", CancellationToken cancellationToken = default); } #endif