Hi all,
I’m trying to adapt mail subject to a blog post content by changing mail template (xwiki/bin/edit/XWiki/Notifications/MailTemplate?editor=object&classname=XWiki.Mail&object=0&force=1).
Is it possible to add velocity content into “subject” ? I’d like to change mail subject according to the content of a blog post. Something like that :
#if ($blog_post_content.contains("incident"))
# set ($subject = "New incident")
#else
# set ($subject = "$services.localization.render('notifications.email.subject', [$events.size()])")
#end
Is it possible to do such a thing ? Do I have to modify macro.vm file ? Otherwise, what about adding to different XWiki.mail objects ?
Regards