Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X
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
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 messageService
from thisSubscription
.Thanks,
Saeed
Nevermind Saeed, I was able to figure it out.
Thank you,
Mike
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
Hi Mike,
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
Mike,
Mike,
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.