Ejemplo n.º 1
0
 public async Task NotifyCommentAsync(CommentPayload payload)
 {
     try
     {
         await SendAsync(new NotificationRequest <CommentPayload>(MailMesageTypes.NewCommentNotification, payload));
     }
     catch (Exception e)
     {
         _logger.LogError(e, e.Message);
     }
 }
Ejemplo n.º 2
0
        public async Task NotifyCommentAsync(
            string username, string email, string ipAddress, string postTitle, string commentContent, DateTime createTimeUtc)
        {
            var payload = new CommentPayload(
                username,
                email,
                ipAddress,
                postTitle,
                ContentProcessor.MarkdownToContent(commentContent, ContentProcessor.MarkdownConvertType.Html),
                createTimeUtc
                );

            try
            {
                await SendAsync(new NotificationRequest <CommentPayload>(MailMesageTypes.NewCommentNotification, payload));
            }
            catch (Exception e)
            {
                _logger.LogError(e, e.Message);
            }
        }