Affects Version/s: 7.0.X, 7.1.X, 7.2.X, Master
Component/s: WCM > Publication > Asset Publisher
When subscribe to Asset Publisher, the email content sent out does not resolve the site name associated with assets.
Step to reproduce:
- Setup outgoing emails in Liferay:
- Go to Control Panel -> Server Administration -> Mail. Setup an outgoing SMTP server.
- Or another option, simply use a fake SMTP server like http://nilhcem.com/FakeSMTP/. In Unix/Linux, need to use sudo when starting the fakeSMTP.jar if you want to listen on port 25. This way, you do not need to use any real email address.
- Change your Liferay user's email address so that it won't be in blacklist.
- Go to any page and add an Asset Publisher portlet.
- Configure the Asset Publisher portlet: Three dots -> Configure -> Subscriptions -> Enable Email Subscriptions.
- Make sure the sender email address not in blacklist.
- Include [$SITE_NAME$] in the body template.
- Subscribe to that Asset Publisher portlet
- In 7.2+, you have to enable subscribe option in Three dots -> Configure -> Display Settings -> Subscribe
- Click on the + button and add any type of asset content (Document, Web Content, Blogs, etc...)
- Check the email sent. The common way is using these Groovy scripts:
In 7.0.x, 7.1.x:
In 7.2 and master:
[$SITE_NAME$] is coming as it is (refer the screenshot)
It should show the respective site name where the Asset resides