Example #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);
     }
 }
Example #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);
            }
        }