This project is read-only.

Comment emails not sent?

Sep 2, 2007 at 10:23 AM
I've got the "Send Comment Emails" option ticked, and the "Test Settings" emails from through fine, but I never get the comment emails.

Any ideas? Does it do anything differently for those?
Sep 2, 2007 at 12:30 PM
This is now fixed
Sep 2, 2007 at 4:05 PM
What was the problem?

I've been modifying things outside of the themes folder (only way to do some things right now), so it might be easier for me to replicate your fix for now so I don't have to make my changes - I'm trying to save all that for the 1.2 release if possible :-)
Sep 2, 2007 at 4:16 PM
It was in post.cs in the SendNotification method. The sender e-mail was wrong
Sep 2, 2007 at 5:15 PM
I see, it's hard-coded with an invalid address :)

I've changed it to

mail.From = new MailAddress(BlogSettings.Instance.Email, BlogSettings.Instance.Name);

and I'll go test...
Sep 2, 2007 at 5:23 PM
Seems that's another bug - I was refering to the Blog Setting emails, handled in Extensions\SendCommentMail.cs. However, I just got an email. Seems intermittent - I have about 6 comments, and only 1 email.

I wonder if it's because the from address isn't validated very well:

string receiver = comment.Email.Contains("@") ? comment.Email : BlogSettings.Instance.Email;

The presence of an @ doesn't mean it's valid. It might be better to use the blogs email address as the sender, rather than the comment author, to make sure there are no problems?
Sep 2, 2007 at 5:24 PM
Also, that variable is badly named - it's the sender, not the receiver that the variable gets used for :)

mail.From = new MailAddress(receiver, comment.Author);
Sep 2, 2007 at 8:19 PM
Now I feel silly...


I'm downloading with POP3, and Gmail doesn't send spam over pop3, so I never noticed (I did check my local spam folder, but they weren't there). Seems there's no option to turn spam off in Gmail, so I'll have to keep an eye on it! :(