This project is read-only.

Comment emails are not being sent out.

Topics: ASP.NET 2.0, Business Logic Layer, Controls
Aug 13, 2008 at 6:32 PM
Hi All,

My email setting are set up and testing successfully. I have the "Send comment e-mail" checkbox checked. But when I post a comment the only email that is sent out is going to the address that is specified in the email section within the settings panel. Nothing ever gets sent to any of the email address I use when I create comments. I've tried an aol and a gmail address with not luck. I'm using BlogEngine 1.4.5. Do I have to do something special in order to get comment emails sent out?

Any help is greatly appreciated! 

Aug 13, 2008 at 7:08 PM
I'm having similar e-mail problems with 1.4.5.  So far the only blogengine e-mail that works for me is the test e-mail when entering settings.  When I try to send e-mail from the Contact Us page, or when comments are added I don't get e-mails.  Any help would be appreciated.
Aug 13, 2008 at 7:40 PM
My email test sometimes  Test successfull  and sometimes unsuccessful.

I get no emails via contact us or comments.
Aug 14, 2008 at 4:24 AM

If the problem is isolated to comment emails you'll want to verify <

sendmailoncomment>True</sendmailoncomment> in /app_data/settings.xml, or in be_settings if using SQL.  As for contact us not working, is this unique to 1.4.5?  Have you ever received emails?  How about with different addresses?  specifically with an email address of the same domain of the blog?  If your site domain is, then try a email address.

Hope that helps some.


Aug 14, 2008 at 7:12 AM

Hi to all,


I face same problem, I try many thing but I can't fixed the send email?

In contact us and comment.

Any help?

Aug 14, 2008 at 3:39 PM
Thanks for your response Dave. I'm using SQL server as my backend. I've checked the be_settings table and sendmailoncomment is set to true. I guess for now I'll have to just remove the checkbox so users leaving comments don't have the option to have emails sent to them. :( At least until I can find some time to try and debug it.

Aug 20, 2008 at 3:49 PM

I was having the same problem and I tool a look at SendCommentEmail.cs in Extensions folder. Look at the following code:

            MailMessage mail = new MailMessage();
// Start faulty code
            mail.From = new MailAddress(from, HttpUtility.HtmlDecode(comment.Author));
// end faulty code

This would need to be changed to:
            mail.From = new MailAddress(BlogSettings.Instance.Email);

I'm using Google Apps on my domain, and therefore all my emails are GMail accounts. The problems with the 1st code would be that
1. It's "faking" the comment author's email address
2. The actual sender and recipient email addresses are the same.
GMail is very picky about these things, so it would drop these emails as unauthorized or spam.

Please note that the fix would require that you fill out the post author's email address under Profiles section. There should have been a better way to do this [-(
Aug 21, 2008 at 10:29 PM
This is happening for me too, in  The test functionality works ok, but the actual mails are not sent when a new comment is added.  I will add a bug report.
Nov 20, 2008 at 8:23 PM
I'm having the same issue here as well with v1.4.5.0.  Test functionality works and I get result email, but no other email activity is sent.  Hosting with GoDaddy and using their pass-through SMTP to a GoDaddy forwarding email (forwarded to gmail, account forwards fine from other sources).  I've attempted other fixes presented (attachment fix, from email fix) with no results.  Has anyone found a fix or work-around yet?
Nov 21, 2008 at 12:10 AM
Ok, updated to v1.4.5.10 & everything just fine... had to figure out command-line compiling first but all is well.
Jul 2, 2009 at 7:40 AM

I am on v. and have the same problem. I do not get an email of the comment posted and the contact page doesnt work.  Ref daveburke (as above) on the contact page, emails from the same domain does work and others dont. Any solutions!?!

Jul 2, 2009 at 7:41 AM

email from the same domain works but others dont. Any suggestions to correct the error?

Aug 23, 2009 at 11:11 AM

I had the same problem and solved it by setting the Sender to the smtp user name. Line 336 in Utils.cs. By updating it in Utils it works for both the contact form and blog comment notifications

if (!string.IsNullOrEmpty(BlogSettings.Instance.SmtpUserName)) {
                    // The sender name must be the same for authentication
                    message.Sender = new MailAddress(BlogSettings.Instance.SmtpUserName);
                    smtp.Credentials = new System.Net.NetworkCredential(BlogSettings.Instance.SmtpUserName, BlogSettings.Instance.SmtpPassword);

Nov 9, 2009 at 2:32 AM

I have the same problem with both comment and contact.

I fixed the comments using another post here

/mail.ReplyTo = new MailAddress(email, name);
//mail.Sender = mail.ReplyTo;

I tried the above fix listed by tryin - that did not work.

Then i realized that my server does not require credentials so that part of the tryin fix was overlooked.  So I put in credentials and it worked half way.  I signed out and made a comment with a non-domain  email.  I also checked notify me when someone post a reply.  I received an email to the admin stating that someone had posted a comment.  So this is an improvement as I would never get them before.  I then signed in as admin and posted a reply.  I received nothing.  Maybe I can understand not receiving a copy of a comment that I wrote, but I never received a notification that someone had posted a reply.  I did check the post XML and the non-domain email address is there asking for notification.  So part of the problem but I would hate to lose someone because they are waiting on a reply. 

Also one thing that has me scratching my head is the older version 1.4. 7 would email when a new post was received.  Did not  matter email address.  Ver 1.5 will only email to domain addresses. 

So has anyone found a work around if credentials are not required?

Nov 9, 2009 at 3:54 AM

I have the same/similar problem. I get occasional comments. I've verified that it's nothing to do with the domain of the sender, because I keep getting spam comments from .in addresses, but I only get some of the "a comment has been added" emails. I've gone through all of the code, rewritten, hardcoded, etc. Nothing seems to resolve it. Could it be a hosting provider issue?

Nov 9, 2009 at 9:00 AM

Comment Notification emails (to people who check the box to be notified when a new comment was added) are not being sent out correctly in BE 1.5 (

This was fixed in on April 14th.  That version or any of the latest builds can be downloaded from the Source Code tab above.  There were actually 2 related fixes made in for this.

Comment Notification Emails Not Sent if Moderation is Off

Comment Notification Emails Sent to Same Person or Not Everyone

Nov 26, 2009 at 3:36 AM


Thank you so much for posting this.  It will save me a lot of time.  I walked through the notification process this evening and saw that SendNotifications(comment); was only called in Post.ApproveComment() like you said, so I figured it had to do with not enabling moderation.  Your work and support is very appreciated.