Comment email notifications for users via subscriptions


Add the ability for users to subscribe to comments on content.

ORM Model

This can be done by adding another relationship to the base content object: CommentSubscriber.
The CommentSubscriber object should just have a one-to-many back to its content parent and the following:

  • Email of Subscriber

  • CreatedDate

  • token - which should be a hash of the email + createdDate + contentID.

UI Unsubscribe

The token will be used to add new route to the UI module to Unsubscribe from the comments:

Adding Subscribers

The comment form should be updated with a new check box that tells the users if they want to subscribe to the conversations. Once the comment is saved and the checkbox is marked then it should verify if the email exists in the CommentSubscriber or not via a criteria query. If not, then add it to the relationship.

Sending Emails

A CommentNotifier interceptor should be created in under contentbox/model/comments/CommentNotifier. This interceptor should listen to onCommentPost and asynchronously be able to use the contentID of the comment to retrieve the comment subscribers and iterate and send the notifications. Also, make sure that subscribers get comments that are NOT moderated.

Email template

A new email template should be created for the comment notifications: comment_notification.cfm

Unsubscribe View

Add new unsubscribe.cfm view to included theme layouts. If custom layout does not have unsubscribe.cfm, create a basic version of it via renderData()

Unsubscribe view should allow for Yes/No confirmation, and should submit via AJAX so that the one view can be used without a lot of fuss


Joel Watson
June 18, 2014, 9:55 PM

Yep, that's right. The blog subscription will be in the next release with the new module approach that you suggested, sched task, etc. I'll get a ticket in once I get home tonight.


Your pinned fields
Click on the next to a field label to start pinning.


Joel Watson


Luis Majano