Affects Version/s: 7.0.X EE
Component/s: Content Display Widgets > Asset Publisher widget
When you enable subscriptions to Asset Publisher, you can configure the the email template that is sent out to subscribers. The issue is that some of the variables don't seem to match their help text.
Here is the Definition of Terms as found underneath the Body
The list of assets
The company ID associated with the assets
The company MX associated with the assets
The company name associated with the assets
The site name associated with the assets
The address of the email recipient
The name of the email recipient
Steps to Reproduce
1. Setup outgoing emails in Liferay. Go to Control Panel -> Server Administration -> Mail.
Setup an outgoing SMTP server. I used my personal Gmail account.
2. Change your Liferay user's email address to a real email address. I used my Liferay email address.
3. Go to any page and add an Asset Publisher portlet.
4. Configure the AP portlet. Three dots -> Configure -> Subscriptions. Enable Email Subscriptions.
You don't necessarily need to edit the email template, but I did so to make certain variables easier to see. You can see for my configs. I used
5. Save all configurations and exit back to the page.
6. Subscribe to the AP portlet
7. Click on the + button and add any type of content via the AP.
8. Wait 24 hours for the Asset check to trigger. Just kidding! Run this Groovy script so it triggers the check at will:
Here is the groovy script to test in master:
You'll get an email like this:
Dear [email protected],
This is an autogenerated email for the Asset Publisher portlet.
The following asset entries have been added to Test Assets: mail test 4, sample.pdf.
mail test 4, sample.pdf
So far I've found these to be incorrect:
1. [$TO_NAME$] returns the same value as [$FROM_ADDRESS$], and seems to be incorrect based on the description.
2. [$FROM_ADDRESS$] and [$TO_ADDRESS$] also appear to be the same. In my test, the real FROM_ADDRESS was the email I set in my Server Administration -> Mail.
3. The TO_ADDRESS was also the same as FROM_ADDRESS, though it still was correctly sent to my user's email address.
Reproduced in 70x-20170618
Reproduced in master - 5104a3fc06a6f4acc934488a9c8f139b89ea24b9