Example #1
0
 static string GetEmailBody(ForumPostItem post)
 {
     return("<!DOCTYPE html>" +
            "<html>" +
            "<head>" +
            "<style>" +
            "html { font-family: sans-serif; }" +
            "p.citation { background: lightgrey; padding: 0.5ex; }" +
            "blockquote { border-left: 0.5ex solid lightgrey; padding-left: 1.0ex; }" +
            ".email-notifications-footer hr { border: 1px solid grey; }" +
            ".email-notifications-footer a { color: grey; }" +
            "</style>" +
            "</head>" +
            "<body>" +
            $"{FormatBodyForEmail(post.Body)}" +
            "<div class='email-notifications-footer'>" +
            "<hr>" +
            $"Post #{post.Index} at {post.Date.ToString("T")} on {post.Date.ToString("D")} by {post.Author} in {post.ForumName} (<a href='{post.ReplyLink}'>reply</a>, <a href='{post.Link}'>view in forum</a>)" +
            "</div>" +
            "</body>" +
            "</html>");
 }
Example #2
0
 static string GetTemplateResult(string template, ForumItem forum, ForumItem topic, ForumPostItem post)
 {
     return(GetTemplateResult(template, forum.Id, topic.Id, post.Id, post.ForumName, post.TopicName, post.Index.ToString()));
 }
Example #3
0
 static string GetSubject(IConfigurationSection config, ForumItem forum, ForumItem topic, ForumPostItem post)
 {
     return(GetTemplateResult(post.Index == 1 ? config["SubjectOP"] : config["SubjectRE"], forum, topic, post));
 }