Updated email settings

This commit is contained in:
2026-10-29 08:48:45 +02:00
parent 067af804ef
commit 1418914242
6 changed files with 21 additions and 29 deletions
@@ -1,5 +1,6 @@
using PostFundManagement.Application.Services.Shared;
using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Configuration.Email;
using PostFundManagement.Infrastructure.Database;
namespace PostFundManagement.Application.Events;
@@ -18,9 +19,10 @@ public sealed class ProcessEmailEvent : IEvent
}
public sealed class ProcessEmailEventHandler(IDbContextFactory<ApplicationDbContext> contextFactory,
IServiceProvider provider, IFeatureManager featureManager) : INotificationHandler<ProcessEmailEvent>
IServiceProvider provider, IFeatureManager featureManager, IOptions<SmtpSettings> options) : INotificationHandler<ProcessEmailEvent>
{
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<ApplicationDbCont
{
Sender = new Domain.Models.Email.Party
{
Address = "noreply@ifritechnologies.co.za",
Name = "Post Fund Management"
Address = emailSettings.SenderEmail,
Name = emailSettings.SenderName
},
Recipient = new Domain.Models.Email.Party
{