Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

Email on Asset unpublish

Avatar

Level 4

I want to send mails to user when his asset gets unpublished using the OOTB feature. 

So, after I configure the Day CQ Mail Service and add email ID to the user details, is there anything else that I need to do? Or will the user automatically receive the email?

1 Accepted Solution

Avatar

Correct answer by
Level 4

No OOTB solution to provide Email injection on unpublishing the Asset

 

You need to do customization to invoke this behaviour

View solution in original post

2 Replies

Avatar

Correct answer by
Level 4

No OOTB solution to provide Email injection on unpublishing the Asset

 

You need to do customization to invoke this behaviour

Avatar

Employee Advisor

Depends on what you mean with "his assets"? Do you mean the uploader? And what do you mean with "OOTB feature"? Is it the direct publication or the workflow?

 

The easiest way is definitely the workflow, where you create a new workflow step (process step) where you read the username from the metadata of the asset you are deactivating. And based on that you can use the Mail API to send the email.

 

It's getting a bit more complex if you want to handle also the direct deactivation (without workflow), because there you would need to listen to the OSGI events issued by the deactivation process (in the OSGI console there is a list of the last events sent).

 

Jörg