From afc75a09d9b472018e40e3e621b441a380e86fe7 Mon Sep 17 00:00:00 2001 From: Shaun Walker Date: Thu, 12 Jan 2023 11:48:25 -0500 Subject: [PATCH] remove extra info from Body as the From display name is now always set to the user's name --- .../Infrastructure/Jobs/NotificationJob.cs | 24 +------------------ 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/Oqtane.Server/Infrastructure/Jobs/NotificationJob.cs b/Oqtane.Server/Infrastructure/Jobs/NotificationJob.cs index 259fae53..13141b66 100644 --- a/Oqtane.Server/Infrastructure/Jobs/NotificationJob.cs +++ b/Oqtane.Server/Infrastructure/Jobs/NotificationJob.cs @@ -128,29 +128,7 @@ namespace Oqtane.Infrastructure mailMessage.Subject = notification.Subject; //body - mailMessage.Body = ""; - - // check if email is being sent from SMTP Sender rather than notification sender - if (!string.IsNullOrEmpty(notification.FromEmail) && mailMessage.From.Address != notification.FromEmail) - { - // include information of who sent the notification in the body - mailMessage.Body += "From: "; - if (!string.IsNullOrEmpty(notification.FromDisplayName)) - { - mailMessage.Body += notification.FromDisplayName + " <" + notification.FromEmail + ">\n"; - } - else - { - mailMessage.Body += notification.FromEmail + "\n"; - } - - } - // check if notification was created in the past - if (notification.CreatedOn.Date != DateTime.UtcNow.Date) - { - mailMessage.Body += "Sent: " + notification.CreatedOn + "\n"; - } - mailMessage.Body += "\n" + notification.Body; + mailMessage.Body = notification.Body; // encoding mailMessage.SubjectEncoding = System.Text.Encoding.UTF8;