I am having some trouble with an attachment configuration I have setup to go with an email sent during an access request. All the examples I have seen I have to rename the attachment. Currently I am renaming the attachment according to a variable(identityDisplayName). Instead of renaming I just want to leave the name whatever the document is named when the requestor uploads it to the request. Any suggestions?
EmailFileAttachment mailAttachment = new EmailFileAttachment(identityDisplayName + “.pdf”, MimeType.MIME_PDF, pdfDecrypted);
options.addAttachment(mailAttachment);
Thanks for the response. Looking at the suggestion, in EmailFileAttachment attachment = new EmailFileAttachment(“example.pdf”, EmailFileAttachment.MimeType.MIME_PDF, fileData);
it seems you’re still setting a static attachment name to “example.pdf”
Was finally able to get this. Took an extra set of eyes to help me with this. Pulled some guidance from Java Docs. I used attached.getName() to pull the value of the attachment at the time it is uploaded into SaiLpoint. See below for more of the code to create the template, attachment..and send it all as one email. Enjoy.