diff --git a/Directory.Build.props b/Directory.Build.props index f15a16c..7b696a1 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -2,7 +2,7 @@ - 3.815.0 + 3.816.0 $(VersionSuffix)-$(BuildNumber) diff --git a/src/VirtoCommerce.NotificationsModule.MicrosoftGraph/MicrosoftGraphEmailNotificationMessageSender.cs b/src/VirtoCommerce.NotificationsModule.MicrosoftGraph/MicrosoftGraphEmailNotificationMessageSender.cs index 906c695..de0f22b 100644 --- a/src/VirtoCommerce.NotificationsModule.MicrosoftGraph/MicrosoftGraphEmailNotificationMessageSender.cs +++ b/src/VirtoCommerce.NotificationsModule.MicrosoftGraph/MicrosoftGraphEmailNotificationMessageSender.cs @@ -31,13 +31,15 @@ public async Task SendNotificationAsync(NotificationMessage message) var emailNotificationMessage = message as EmailNotificationMessage ?? throw new ArgumentException($"The message is not {nameof(EmailNotificationMessage)} type"); + emailNotificationMessage.From ??= _emailSendingOptions.DefaultSender; + try { var graphMessage = new Message { Subject = emailNotificationMessage.Subject, Body = new ItemBody { ContentType = BodyType.Html, Content = emailNotificationMessage.Body }, - From = NewRecipient(emailNotificationMessage.From ?? _emailSendingOptions.DefaultSender), + From = NewRecipient(emailNotificationMessage.From), ToRecipients = [NewRecipient(emailNotificationMessage.To)], CcRecipients = emailNotificationMessage.CC?.Select(NewRecipient).ToList() ?? [], BccRecipients = emailNotificationMessage.BCC?.Select(NewRecipient).ToList() ?? [] diff --git a/src/VirtoCommerce.NotificationsModule.Web/module.manifest b/src/VirtoCommerce.NotificationsModule.Web/module.manifest index 5a8090c..05292ba 100644 --- a/src/VirtoCommerce.NotificationsModule.Web/module.manifest +++ b/src/VirtoCommerce.NotificationsModule.Web/module.manifest @@ -1,7 +1,7 @@ VirtoCommerce.Notifications - 3.815.0 + 3.816.0 3.853.0