How to access recipient address / user in a template

Information varies from method to method.

Non-JIRA user IssueEvent notifications

The following velocity expression will resolve the recipient smtp address (user@domain):

$recipientEmail

JIRA user IssueEvent notifications

The following velocity expressions will resolve the recipients email and related JIRA ApplicationUser (since JEMH 1.7.22)

$recipientEmail $recipientUser

 

DefaultJIRA templates: createDefaultJiraUserEmail

Custom templateSet: renderJiraUserJEMHMailQueueItem

Adhoc and Postfunction notifications

As one message is sent, string arrays of recipient smtp addresses (user@domain) are available for each of the following recipient types, e.g. $recipientEmail_To[0] will give the first item

$recipientEmail_TO $recipientEmail_CC $recipientEmail_BCC