Email notification for new Comments at blogposts - General Discussions - General Discussions - Progress Community
 General Discussions

Email notification for new Comments at blogposts

  • Email notification for new Comments at blogposts
  • Hi,
    I've scoured the forum and documentation for all information about the EmailAuthor option specified in the advanced settings of the administration panel in the backend. The description of this option, together with some online documentation, tells me that, when enabled (and ApproveComments set to True), notifications should be send to the author (same as owner?).
    But, no notifications were received by any author.

    What would be the appropriate setup for authors/owners to be notified for approval of any new comment? Sitefinity version in use: 5.0.2800.0

    Thanks!
  • Anyone?!
  • As far as I know, there's no email notifications, I've certainly never recieved any, thats why I moved over to disqus

    http://www.sitefinitysteve.com/blog/code/2012/06/11/time-to-disqus

    I think there's a larger site-wide notification system in the works...but won't hit till at the very least 5.2 I'd imageine...

    Just to make sure though...your SMTP settings are all correct?
  • I don't see any way to get notifications either but can we get a confirmation from someone at Sitefinity? I need to know for a client.
  • @Telerik
    Any news on this

    @all
    How are your clients working with comments. Just go from time to time to Blogs, Events and then click on Manage also: Comments for Events.

    Still looking for a dashboard (not Falafel) that would tell me that some comments await approval, some pages need approval and stuff.

    Markus
  • I ended up opening a support ticket with Sitefinity and used what they sent below, it worked for me.

    --------------------------------------------------------------

    Hello,

    Thank you for using our service! I really apologies for my delayed!

    It is not available out of the box, but can be done with this customization.
    Create a class in your solution and create a custom comment class as in the sample below.

    For blog comments:

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Net.Mail;
    using Telerik.Sitefinity.Configuration;
    using Telerik.Sitefinity.Services;
    using System.Text;
    using Telerik.Sitefinity.Web.Mail;
    using System.ComponentModel;
        
    namespace SitefinityWebApp
        public class CustomComments : Telerik.Sitefinity.Modules.GenericContent.Web.UI.Views.CommentsDetailsView
        
            protected override void SubmitComment()
            
                   if (this.EmailControl.Value != String.Empty)
                    
                base.SubmitComment();
                var smtpSettings = Config.Get<SystemConfig>().SmtpSettings;
                MailMessage message = new MailMessage();
                message.From = new MailAddress(smtpSettings.DefaultSenderEmailAddress);
                message.To.Add(new MailAddress("stefani.tacheva@telerik.com"));
                StringBuilder sb = new StringBuilder();
                sb.AppendFormat("You have one new form response on  form. The response is sent from IP address");
                message.Subject = "Forms notification";
                message.Body = sb.ToString();
                message.IsBodyHtml = true;
                message.BodyEncoding = Encoding.Unicode;
                message.SubjectEncoding = Encoding.Unicode;
                EmailSender.Get().Send(message);
                 
             
         


    Go to Administration -> Settings -> Advanced -> ContentView -> Controls -> BlogCommentsFrontend -> Views -> CommentsDetailView -> find the textbox ViewType and enter in it the namespace.class of the class created (in my case SitefinityWebApp.CustomComments ).
    This will send email for  blog comments only. Following the same pattern the same class can be used to send comments for news, events

    To receive the e-mail you must have valid SMTP settings configured in Administration->Settings->Advanced->System->SMTP
  • I tried out this fix, and after changing the ViewType I can't get into any page with the blog widget on it, or ContentView -> Controls section.
    I just keep getting

    Cannot create an instance of
    Telerik.Sitefinity.Web.UI.ContentUI.Config.ContentViewDefinitionElement
    because it is an abstract class.

    I can't seem to get it fixed, I restored the DB for the site from a backup that runs fine, and it still gives me this message! Any ideas? Any post I found in a search just redirect to the forum home page...as I have found with a lot the things I am looking for!

    Thanks


  • Hello,

     I am attempting to do this in SF 6.1, but although it works when someone posts a comment, there are lots of notifications coming through when no comment has actually been posted.

    Any suggestions?

  • I believe that we ran into something similar. I can't find the code at the moment but I believe you need to add a check to the code to see if the page/form is valid.  The code above is emailing you all of the attempted form submissions - even the ones that fail validation and never make it into the database.