diff --git a/League/BackgroundTasks/SendEmailTask.cs b/League/BackgroundTasks/SendEmailTask.cs index 3aa25fe6..fa192be4 100644 --- a/League/BackgroundTasks/SendEmailTask.cs +++ b/League/BackgroundTasks/SendEmailTask.cs @@ -72,7 +72,7 @@ public async Task RunAsync(CancellationToken cancellationToken) { try { - await _mailMergeService.Sender.SendAsync(mmm, null); + await _mailMergeService.Sender.SendAsync(mmm, null!); } catch (Exception e) when (e is TaskCanceledException || e is OperationCanceledException) { diff --git a/League/Emailing/Creators/ContactFormCreator.cs b/League/Emailing/Creators/ContactFormCreator.cs index 0d90b92c..252cb531 100644 --- a/League/Emailing/Creators/ContactFormCreator.cs +++ b/League/Emailing/Creators/ContactFormCreator.cs @@ -46,7 +46,7 @@ public async IAsyncEnumerable GetMailMergeMessages(ITenantCont var mailMergeMessage = mailMergeService.CreateStandardMessage(); mailMergeMessage.EnableFormatter = false; - mailMergeMessage.Subject = model.Form.Subject; // user-generated, cannot localize! + mailMergeMessage.Subject = model.Form.Subject!; // user-generated, cannot localize! mailMergeMessage.MailMergeAddresses.Add(new MailMergeAddress(MailAddressType.From, tenantContext.SiteContext.Email.ContactFrom.Address)); mailMergeMessage.MailMergeAddresses.Add(new MailMergeAddress(MailAddressType.To, tenantContext.SiteContext.Email.ContactTo.Address)); diff --git a/League/League.csproj b/League/League.csproj index 9c7ea2d0..41a765fe 100644 --- a/League/League.csproj +++ b/League/League.csproj @@ -45,7 +45,7 @@ Localizations for English and German are included. The library is in operation o - + @@ -57,9 +57,9 @@ Localizations for English and German are included. The library is in operation o - - - + + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/League/LeagueStartup.cs b/League/LeagueStartup.cs index 8728b075..3c393ca1 100644 --- a/League/LeagueStartup.cs +++ b/League/LeagueStartup.cs @@ -454,7 +454,7 @@ public static void ConfigureServices(WebHostBuilderContext context, IServiceColl $@"MailMergeLib.{environment.EnvironmentName}.config"), System.Text.Encoding.UTF8); var fms = FileMessageStore.Deserialize(Path.Combine(environment.ContentRootPath, League.LeagueStartup.ConfigurationFolder, - "MailMergeLibMessageStore.config"), System.Text.Encoding.UTF8); + "MailMergeLibMessageStore.config"), System.Text.Encoding.UTF8)!; for (var i = 0; i < fms.SearchFolders.Length; i++) { // make relative paths absolute - ready to use