diff --git a/Snittlistan.Web/Commands/HandleMailCommandHandler.cs b/Snittlistan.Web/Commands/HandleMailCommandHandler.cs index a2b24dd8..fe0a1b6e 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.Substring(0, Math.Min(100, email.Subject.Length)), + email.Subject, state)); Logger.InfoFormat("sending email {@email}", email); await CompositionRoot.EmailService.SendAsync(email); diff --git a/Snittlistan.Web/Models/EmailState.cs b/Snittlistan.Web/Models/EmailState.cs index 60fafefd..8167358d 100644 --- a/Snittlistan.Web/Models/EmailState.cs +++ b/Snittlistan.Web/Models/EmailState.cs @@ -16,7 +16,7 @@ protected EmailState( From = from; To = to; Bcc = bcc; - Subject = subject; + Subject = subject.Substring(0, Math.Min(100, subject.Length)); } public static string OwnerEmail { get; } = ConfigurationManager.AppSettings["OwnerEmail"];