Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-21628

Notification email template context should provide the NuxeoPrincipal of the recipient.

    XMLWordPrintable

    Details

      Description

      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.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              jfletcher Joshua Fletcher
              Participants:
            • Votes:
              4 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: