From 14189142421313542995d7f3dec016fb392c5fe6 Mon Sep 17 00:00:00 2001 From: Hermes Agent Date: Thu, 29 Oct 2026 08:48:45 +0200 Subject: [PATCH] Updated email settings --- .../Events/LateProjectReminderEvent.cs | 2 -- .../Events/NonCompliantProjectEvent.cs | 24 ++++--------------- .../Events/ProcessEmailEvent.cs | 8 ++++--- .../Configuration/Email/SmtpSettings.cs | 4 ++++ PostFundManagement.Jobs/appsettings.json | 8 +++---- docker-compose.yml | 4 +++- 6 files changed, 21 insertions(+), 29 deletions(-) diff --git a/PostFundManagement.Application/Events/LateProjectReminderEvent.cs b/PostFundManagement.Application/Events/LateProjectReminderEvent.cs index 69d1016..c2d38f6 100644 --- a/PostFundManagement.Application/Events/LateProjectReminderEvent.cs +++ b/PostFundManagement.Application/Events/LateProjectReminderEvent.cs @@ -34,8 +34,6 @@ public sealed class LateProjectEventHandler(IDbContextFactory 0 ? now.AddDays(-lateDays) : now; - // Query overdue milestones that are not yet approved - // Execute ToListAsync before GroupBy so EF Core does not fail SQL translation var overdueMilestones = await context.Milestones .AsNoTracking() .Include(i => i.Project) diff --git a/PostFundManagement.Application/Events/NonCompliantProjectEvent.cs b/PostFundManagement.Application/Events/NonCompliantProjectEvent.cs index 61e7b00..0869339 100644 --- a/PostFundManagement.Application/Events/NonCompliantProjectEvent.cs +++ b/PostFundManagement.Application/Events/NonCompliantProjectEvent.cs @@ -1,5 +1,3 @@ -using System.Net; -using System.Text; using PostFundManagement.Application.Abstractions.Services; using PostFundManagement.Application.Services.Communications; using PostFundManagement.Domain; @@ -33,7 +31,6 @@ public sealed class NonCompliantProjectEventHandler(IDbContextFactory p.Programme) @@ -167,14 +164,8 @@ public sealed class NonCompliantProjectEventHandler(IDbContextFactory contextFactory, - IServiceProvider provider, IFeatureManager featureManager) : INotificationHandler + IServiceProvider provider, IFeatureManager featureManager, IOptions options) : INotificationHandler { const int maxBatch = 100; + readonly SmtpSettings emailSettings = options.Value; public async ValueTask Handle(ProcessEmailEvent notification, CancellationToken cancellationToken) { @@ -74,8 +76,8 @@ public sealed class ProcessEmailEventHandler(IDbContextFactory