feat(notifications): EWS branch in the email delivery adapter

This commit is contained in:
Joseph Doherty
2026-08-10 06:27:19 -04:00
parent 2ee5586406
commit 08957cc907
3 changed files with 483 additions and 10 deletions
@@ -26,10 +26,14 @@ public static class ServiceCollectionExtensions
/// This extension covers only the outbox-specific registrations. The
/// <see cref="EmailNotificationDeliveryAdapter"/> reuses the
/// <see cref="ZB.MOM.WW.ScadaBridge.NotificationService"/> SMTP machinery —
/// <c>Func&lt;ISmtpClientWrapper&gt;</c>, <c>OAuth2TokenService</c> and
/// <c>NotificationOptions</c> — so the caller (the Host on the central node) must also
/// call <c>AddNotificationService()</c>. Re-registering those services here would
/// duplicate them; relying on <c>AddNotificationService</c> keeps a single source of truth.
/// <c>Func&lt;ISmtpClientWrapper&gt;</c>, <c>OAuth2TokenService</c>,
/// <c>NotificationOptions</c> and — for configuration rows selecting the EWS transport —
/// <c>IEwsMailSender</c> with its named HTTP client — so the caller (the Host on the
/// central node) must also call <c>AddNotificationService()</c>. Re-registering those
/// services here would duplicate them; relying on <c>AddNotificationService</c> keeps a
/// single source of truth. Each is an optional constructor parameter on the adapter, so a
/// host that skips <c>AddNotificationService()</c> still constructs — an EWS row then
/// fails permanently ("no EWS sender is registered") rather than falling back to SMTP.
///
/// <see cref="EmailNotificationDeliveryAdapter"/> is registered <em>scoped</em> because it
/// takes a scoped <see cref="ZB.MOM.WW.ScadaBridge.Commons.Interfaces.Repositories.INotificationRepository"/>