Updated email settings
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user