diff --git a/Snittlistan.Web/Commands/HandleMailCommandHandler.cs b/Snittlistan.Web/Commands/HandleMailCommandHandler.cs index fe0a1b6e..a2b24dd8 100644 --- a/Snittlistan.Web/Commands/HandleMailCommandHandler.cs +++ b/Snittlistan.Web/Commands/HandleMailCommandHandler.cs @@ -83,7 +83,7 @@ await CompositionRoot.Databases.Snittlistan.KeyValueProperties email.From, email.To, email.Bcc, - email.Subject, + email.Subject.Substring(0, Math.Min(100, email.Subject.Length)), state)); Logger.InfoFormat("sending email {@email}", email); await CompositionRoot.EmailService.SendAsync(email); diff --git a/Snittlistan.Web/Infrastructure/Installers/EmailServiceInstaller.cs b/Snittlistan.Web/Infrastructure/Installers/EmailServiceInstaller.cs index 334457dd..2ec7ff19 100644 --- a/Snittlistan.Web/Infrastructure/Installers/EmailServiceInstaller.cs +++ b/Snittlistan.Web/Infrastructure/Installers/EmailServiceInstaller.cs @@ -1,13 +1,13 @@ - +#nullable enable + using System.Web.Mvc; using Castle.MicroKernel.Registration; using Castle.MicroKernel.SubSystems.Configuration; using Castle.Windsor; using Postal; -#nullable enable - namespace Snittlistan.Web.Infrastructure.Installers; + public class EmailServiceInstaller : IWindsorInstaller { private readonly string viewsPath;