Community moderators have prevented the ability to post new answers.
I don't think you can attach files in the outgoing emails in JIRA without modifying the underlying code. What you can probably do as a workaround is to send out a link to the file by customizing the email content. Not sure if it helps you!
If you are trying to achieve this inside of a plugin, you can construct an e-mail via the standard javax.mail classes.
The hierarchy is something like
The MimeBodyPart may contain text, html, binary data - just set the right mime type.
Finally you queue the e-mail, creating a new com.atlassian.mail.queue.SingleMailQueueItem
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.