|
|
@ -1,5 +1,6 @@ |
|
|
using LINGYUN.Abp.Identity; |
|
|
using LINGYUN.Abp.Identity; |
|
|
using LINGYUN.Abp.RealTime.Localization; |
|
|
using LINGYUN.Abp.RealTime.Localization; |
|
|
|
|
|
using Markdig; |
|
|
using Microsoft.Extensions.Localization; |
|
|
using Microsoft.Extensions.Localization; |
|
|
using Microsoft.Extensions.Logging; |
|
|
using Microsoft.Extensions.Logging; |
|
|
using Microsoft.Extensions.Options; |
|
|
using Microsoft.Extensions.Options; |
|
|
@ -59,6 +60,11 @@ public class EmailingNotificationPublishProvider : NotificationPublishProvider |
|
|
{ |
|
|
{ |
|
|
var title = notification.Data.TryGetData("title").ToString(); |
|
|
var title = notification.Data.TryGetData("title").ToString(); |
|
|
var message = notification.Data.TryGetData("message").ToString(); |
|
|
var message = notification.Data.TryGetData("message").ToString(); |
|
|
|
|
|
// markdown进行处理
|
|
|
|
|
|
if (notification.ContentType == NotificationContentType.Markdown) |
|
|
|
|
|
{ |
|
|
|
|
|
message = Markdown.ToHtml(message); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
await EmailSender.SendAsync(emailAddress, title, message); |
|
|
await EmailSender.SendAsync(emailAddress, title, message); |
|
|
} |
|
|
} |
|
|
@ -92,6 +98,12 @@ public class EmailingNotificationPublishProvider : NotificationPublishProvider |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// markdown进行处理
|
|
|
|
|
|
if (notification.ContentType == NotificationContentType.Markdown) |
|
|
|
|
|
{ |
|
|
|
|
|
message = Markdown.ToHtml(message); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
await EmailSender.SendAsync(emailAddress, title, message); |
|
|
await EmailSender.SendAsync(emailAddress, title, message); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|