Problem: I need to send emails with dynamic From name and/or From address.  


Solution: First, make sure, that your SMTP server is supporting this feature. Many cloud SMTP's like gmail.smtp.com, for instance, will not allow you to send an email message if the sender's

name or email doesn't correspond to the name specified in email account during registration. If you're running your own SMTP, then it shouldn't be a problem.


To change the From name or From address for particular notification configuration you use these functions:


$jirassimo.customEmailFrom($value) - to set a custom sender's name.

$jirassimo.customEmailFromAddress($value) - to set a custom sender's address


The values passed to these functions can be static or dynamic. For instance, let's say that from particular notification configuration we want to send an email from Josh Anderson (josh@company.com). 

In notification template add the following lines:


$jirassimo.customEmailFrom("josh@company.com")
$jirassimo.customEmailFromAddress("Josh Anderson")


Another example - you want to send the email in the name of Jira ticket's assignee. Here's how you do that:


$jirassimo.customEmailFrom($issue.fields.assignee.emailAddress)
$jirassimo.customEmailFromAddress($issue.fields.assignee.displayName)


The technique shown above will work for any User field in Jira. 



If you need to apply FROM name and/or FROM address globally for the whole Jira or specific project(s), then you can set appropriate values in Raley settings
as described on this page. If you specify FROM name/address globally, then it will apply by default to all Notifications configurations which haven't overridden it in their Notification Template.


For information on how to set email priority and other email headers check out our template helpers