The canned scriptrunner send email post function is great.
The problem I am facing is when issues contain multiple attachments which end up adding up to be greater then the total size that the email server will allow to be sent. JIRA single attachment file size limitation is below our companies email total file size policy, so any single attachment can be sent by email. Many of the issues have dozens of small attachments that just add up.
I am hoping there is some functionality I am missing. I would be happy if each attachment were sent in a single email even if they didn't add up to more than the file size limit.
I am comfortable with modifying existing custom groovy scripts but everything I could find so far uses deprecated AttachmentUtils code (getAttachmentFile).