using LiteCharms.Features.Notifications.Commands; using static LiteCharms.Abstractions.Constants; namespace LiteCharms.Features.Email.Events.Handlers; public class SendShopEmailEnquiryEventHandler(ISender mediator) : INotificationHandler { public async ValueTask Handle(SendShopEmailEnquiryEvent notification, CancellationToken cancellationToken) { var command = CreateNotificationCommand.Create(Models.NotificationDirection.Outgoing, notification.SenderName!, notification.SenderAddress!, notification.Subject!, notification.Message!, Models.NotificationPlatforms.Email, notification.Priority, ShopEmailFromName, ShopEmailFromAddress, Guid.CreateVersion7().ToString(), Models.CorrelationIdTypes.None, isInternal: true, isHtml: false); await mediator.Send(command, cancellationToken); } }