cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Blog Comment Notification

Visitor

Blog Comment Notification

Hello,

I am wondering if there is a snippet I could use to have an email sent to a user when their blog post gets commented on. I have noticed that I receive an email when a post on the community site gets commented on and wanted to know how I could incorporate that.

Thank you,
Mike

8 REPLIES 8

Blog Comment Notification

Hi Michael,

There is the

SendMessage

service snippet on the MailServer ThingTemplate that you can call from a subscription on your blog. 


1.) Create a Notification Thing that implements the MailServer Template and configure your SMTP settings here. 

2.) On your Blog Thing, create a service to send messages using the SentMessage Snippet from your Notification Thing in the Entities tab.           Set the message, subject, and email address in the parameters of this service.

3.) On your Blog, add a subscription with

AddComment

as the event trigger and call your send message

Service

from this

Subscription

.


Thanks,

Saeed



Blog Comment Notification

Saeed,

Thank you for the response! For the "from" portion of the SentMessage snippet should I put the name of the Notification Thing or the email address I setup within the Notification Thing?

Thank you,

Mike



Blog Comment Notification

Also,

How do I set the email address to the user's email address who's post was commented on as well as reference what the comment said?

Thank you,

Mike



Blog Comment Notification

Nevermind Saeed, I was able to figure it out.

Thank you,

Mike



Blog Comment Notification

Hi Mike,

You'll put the email address that you are using to send email, not the name of the Thing sending it.

Blog Comment Notification

Mike,

When an Event is triggered, it sends relevant data to any Thing that subscribes to it. In the case of CommentAdd, you get the id of the Blog entry, the type of entry and the comment's id and the parent's id. With this information, you can retrieve the Blog entry using GetComment() or a similar Service and retrieve the source of the comment's email address by access his emailAddress User Extension.

Blog Comment Notification

Mike,

Just wanted to touch base with you and see how you're making out with this functionality. If necessary, I can provide you with a simple example of how to send emails when a new comment is added.

Blog Comment Notification

Thanks Adam! I was able to figure it out unfortunately the network I am on will not allow emails sent on port 25. Trying to find a work around to it currently.



Announcements

Thingworx Navigate content has a new home! Click here to access the new Thingworx Navigate forum! ______________________________