Add SMTP dispatcher seam and MailKit implementation
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
namespace ROLAC.API.Services.Notifications;
|
||||
|
||||
/// <summary>One outbound email envelope handed to the SMTP transport.</summary>
|
||||
public sealed record OutboundEmail(
|
||||
string ToAddress,
|
||||
string Subject,
|
||||
string HtmlBody,
|
||||
IReadOnlyList<EmailAttachment> Attachments);
|
||||
|
||||
/// <summary>Thin seam over the actual MailKit send so EmailService stays unit-testable.</summary>
|
||||
public interface ISmtpDispatcher
|
||||
{
|
||||
Task SendAsync(OutboundEmail email, CancellationToken ct = default);
|
||||
}
|
||||
Reference in New Issue
Block a user