+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / Email notification for new Comments at blogposts

Email notification for new Comments at blogposts

9 posts, 0 answered
  1. Jelle Spaan | RedMatters
    Jelle Spaan | RedMatters avatar
    26 posts
    Registered:
    07 Sep 2010
    05 Jun 2012
    Link to this post
    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!
  2. Jelle Spaan | RedMatters
    Jelle Spaan | RedMatters avatar
    26 posts
    Registered:
    07 Sep 2010
    14 Jun 2012
    Link to this post
    Anyone?!
  3. Steve
    Steve avatar
    3037 posts
    Registered:
    03 Dec 2008
    14 Jun 2012
    Link to this post
    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?
  4. Ben
    Ben avatar
    44 posts
    Registered:
    27 Sep 2012
    28 Aug 2012
    Link to this post
    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.
  5. Markus
    Markus avatar
    2763 posts
    Registered:
    25 Nov 2005
    02 Oct 2012
    Link to this post
    @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
  6. Ben
    Ben avatar
    44 posts
    Registered:
    27 Sep 2012
    02 Oct 2012
    Link to this post
    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
  7. Ryan
    Ryan avatar
    6 posts
    Registered:
    20 Aug 2012
    10 Oct 2012
    Link to this post
    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


  8. Nicholas
    Nicholas avatar
    9 posts
    Registered:
    30 Jun 2013
    02 Apr 2014
    Link to this post

    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?

  9. Marc Baron
    Marc Baron avatar
    7 posts
    Registered:
    14 Apr 2010
    02 Apr 2014 in reply to Nicholas
    Link to this post

    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.

9 posts, 0 answered