Add null check when sending SendEmailNotification

This commit is contained in:
Mole
2021-06-04 10:57:14 +02:00
parent 91b59c6c67
commit d2dae7f35b

View File

@@ -53,7 +53,8 @@ namespace Umbraco.Cms.Infrastructure
{
if (enableNotification)
{
await _eventAggregator.PublishAsync(new SendEmailNotification(message.ToNotificationEmail(_globalSettings.Smtp.From)));
await _eventAggregator.PublishAsync(
new SendEmailNotification(message.ToNotificationEmail(_globalSettings.Smtp?.From)));
}
return;
}