namespace DigitalData.MessagingService.Abstraction; /// /// DTO for a single email account configuration. /// public class EmailAccountDto { /// /// Logical name to identify this account (e.g. "default", "support"). /// public int Id { get; set; } #if NET public required string Username { get; set; } #else public string Username { get; set; } = null!; #endif #if NET public required string Password { get; set; } #else public string Password { get; set; } = null!; #endif #if NET public required string SmtpServer { get; set; } #else public string SmtpServer { get; set; } = null!; #endif public int SmtpPort { get; set; } public bool SmtpUseSsl { get; set; } public bool UseOAuth2 { get; set; } /// /// IMAP server hostname (e.g. "imap.example.com"). /// Leave empty when this account is send-only. /// public string? ImapServer { get; set; } /// /// IMAP server port (993 for SSL, 143 for plain/STARTTLS). /// public int ImapPort { get; set; } = 993; /// /// Use SSL/TLS when connecting to the IMAP server. /// public bool ImapUseSsl { get; set; } = true; }