With Raley you can also send emails with attachments from JIRA issue. You can either:

Send all attachments in the issue, optionally filtering by file extension

Use function $jirassimo.includeAttachments() to send every attachment from the issue with current notification. You can put this statement anywhere in your message template.

For example:

  $jirassimo.includeAttachments(".*.pdf")

will send all PDF files from current issues as email attachments.

  $jirassimo.includeAttachments(".*.[pdf|doc]")

will send all PDF and DOC files from the issue as email attachments


Send attachments referenced in comment

Often you would want to send a notification of type JIRA issue event that contains the latest comment and files added with that as attachments. The following code demonstrates how to do this:

#foreach ($att in $issue.addedComment.attachments)
  $jirassimo.includeAttachmentByFilename($att.filename)
#end


If you need to send the attachments of the latest comment in retrospective, say as a Canned message from issue page, then use the following construct:

#foreach ($com in $issue.fields.comment.comments)
#if( !$velocityHasNext )
Last comment $com.bodyHTML
#foreach ($att in $com.attachments)
$jirassimo.includeAttachmentByFilename($att.filename)
#end
#end
#end

In the example above, we refer to attachment via filename instead of attachment ID. Both techniques are valid for Raley to pick up comments.


    

Sending inline attachments

When you add a comment to a JIRA issue or a ServiceDesk, pretty often you'd want to attach inline images. Those are image files that are "embedded" into email body and will be visible to your notifications recipients right away without having to download and open an attachment.

Raley can transparently handle this type of attachments and send them as inline images in your email notifications. This is default behaviour and is available out-of-the box without having to change anything in your notification configuration.