Notification job must convert \n to <br /> now that IsNodyHtml is set to True

This commit is contained in:
sbwalker 2023-08-14 17:03:21 -04:00
parent c2acd010ce
commit 7cbc21671b
2 changed files with 2 additions and 2 deletions

View File

@ -130,7 +130,7 @@ namespace Oqtane.Infrastructure
mailMessage.Subject = notification.Subject;
//body
mailMessage.Body = notification.Body;
mailMessage.Body = notification.Body.Replace("\n", "<br />");
// encoding
mailMessage.SubjectEncoding = System.Text.Encoding.UTF8;

View File

@ -143,7 +143,7 @@ namespace Oqtane.Managers
else
{
string url = alias.Protocol + alias.Name;
string body = "Dear " + user.DisplayName + ",\n\nA User Account Has Been Successfully Created For You. Please Use The Following Link To Access The Site:\n\n" + url + "\n\nThank You!";
string body = "Dear " + user.DisplayName + ",\n\nA User Account Has Been Successfully Created For You With The Username " + user.Username + ". Please Visit " + url + " And Use The Login Option To Sign In. If You Do Not Know Your Password, Use The Forgot Password Option On The Login Page To Reset Your Account.\n\nThank You!";
var notification = new Notification(user.SiteId, User, "User Account Notification", body);
_notifications.AddNotification(notification);
}