-
Type: Improvement
-
Status: Open
-
Priority: Major
-
Resolution: Unresolved
-
Affects Version/s: 8.10
-
Fix Version/s: QualifiedToSchedule
-
Component/s: Email Sending, Workflow
-
Tags:
-
Backlog priority:499
An email notification template (sent in a workflow task notification context, for example) only provides the email address of the user receiving the email notification. It would be really nice to have the full NuxeoPrincipal of the recipient so that the template could access the first name, last name, etc., e.g. so you can have text like "Dear ${recipient.firstName},"
There is a "recipients" object but it is not useful because it's just a list of all the recipients (and I don't know who the current recipient is in the template context anyway). Also it contains "unexpanded" values, i.e. it will contain group ids instead of all the members of the group.
Take a look at org.nuxeo.ecm.platform.ec.notification.email.EmailHelper.sendmail0() for the parameter injection and note that org.nuxeo.ecm.platform.ec.notification.NotificationEventListener already accesses NuxeoPrincipal to get the email.