diff --git a/Oqtane.Server/Infrastructure/Jobs/NotificationJob.cs b/Oqtane.Server/Infrastructure/Jobs/NotificationJob.cs index ab9cc058..d65acb0a 100644 --- a/Oqtane.Server/Infrastructure/Jobs/NotificationJob.cs +++ b/Oqtane.Server/Infrastructure/Jobs/NotificationJob.cs @@ -130,7 +130,12 @@ namespace Oqtane.Infrastructure mailMessage.Subject = notification.Subject; //body - mailMessage.Body = notification.Body.Replace("\n", "
"); + mailMessage.Body = notification.Body; + if (!mailMessage.Body.Contains("<") || !mailMessage.Body.Contains(">")) + { + // plain text messages should convert line breaks to HTML tags to preserve formatting + mailMessage.Body = mailMessage.Body.Replace("\n", "
"); + } // encoding mailMessage.SubjectEncoding = System.Text.Encoding.UTF8;