refactor: 邮件正文为 HTML 更改换行符为 br
This commit is contained in:
parent
e2a216919d
commit
735acfb0d1
|
@ -67,7 +67,7 @@ namespace Bootstrap.Client.Extensions
|
|||
var rowData = new StringBuilder();
|
||||
foreach (var row in data.GetProperty("Data").EnumerateObject())
|
||||
{
|
||||
rowData.AppendFormat(trTemplate, row.Name, row.Value.GetRawText().Replace("\\r\\n", "<br>").Replace("\\n", "<br>"));
|
||||
rowData.AppendFormat(trTemplate, row.Name, row.Value.GetRawText());
|
||||
}
|
||||
sb.Append(string.Format(itemTemplate, cate[itemName], data.GetProperty("Duration").GetString(), state[data.GetProperty("Status").GetRawText()], rowData.ToString()));
|
||||
}
|
||||
|
@ -209,7 +209,7 @@ namespace Bootstrap.Client.Extensions
|
|||
}
|
||||
|
||||
// 合并消息
|
||||
content.AppendLine(msg.Message);
|
||||
content.AppendLine(msg.Message.Replace("\\r\\n", "<br>").Replace("\\n", "<br>"));
|
||||
}
|
||||
if (sender != null && mail != null)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue