E-Mail Updates Working – Finally!
One thing that has always annoyed me about the SharePoint blog template is that users who leave comments are not offered the option to receive e-mail notifications when further comments are posted to the same thread. How can we have a (virtual) conversation if you don’t know when I’ve responded to your last communication? A silly oversight, if you ask me, and I’ve always meant to get around to fixing that.
Well, it’s finally done. I’ve implemented the event handlers on all the BinaryWave blogs to notify users who have included their email address with a comment and selected the ‘Receive Alerts’ option. Initially, I was hoping to use the built-in Alerts functionality in SharePoint but that only works with authenticated users who have an entry in the profile database. Not much good for a public-facing blog with anonymous access. So I had to write an event handler from scratch and use the .NET messaging components to send email. It’s nothing fancy – just the title and body of the comment and a link to the original post – but it works.
Go ahead and give it a try. You only need to supply your email address and check the ‘Receive Alerts’ option (it’s enabled by default) once for each thread (post); if you’ve already done so in the past then the alerts should work for any new comments in those threads. Let me know (with a comment, of course) if you experience any issues.
P.S. – I’ve decided not to release this as a solution because it requires too many manual settings for my liking. You have to create new site columns, update the content types (or the lists directly), and hard-code the Posts list name (I suppose that could go in web.config but that’s one more step to take), then apply the event handler to one or more specific lists. I did whip up an application page to do the last part but it’s still not a very elegant solution. If you really want the source code just post a comment to that effect or email me directly and I’ll zip it up and send it to you.
Leave a Reply
You must be logged in to post a comment.