Send email upon publish/unpublish of an item in custom component

by Zack   Last Updated August 01, 2020 12:10 PM

I have created a hello world component based upon this documentation

I want to send a notification to users if an item's publishing status has been changed.

I found the function listItemTask. Can we override this function in my custom component?

Answers 1

I would suggest you look at creating a plugin to send the email that responds to a onContentChangeState event trigger. The plugin would check that it is an item of your component being changed($context in the params) and then it will provide the ID and the value(Published/Unplublished) that you can use in your email subject or body.

This should be a starting point for you,, third from the bottom.

November 05, 2019 09:48 AM

Related Questions

Registration Email Include Additional Contents

Updated June 08, 2020 11:10 AM

Update module content by email trigger?

Updated July 06, 2015 13:04 PM

Get user info and send email from button

Updated February 24, 2016 01:04 AM

Poll/survey component with email verification

Updated April 05, 2018 15:10 PM