Hello,
I’d like to attach a file to an e-mail send with the bpmn-mail-connector. The file is stored in a process variable. Is there a chance to directly attach that file to the e-mail? I have only found a way to attach a file by passing the file path. When I directly pass the process variable containing the file to the property “fileNames”, the following error occurs: “Cannot cast from File to String”.
Internally the SendMailConnector uses the method attachFile from MimeBodyPart. Theoretically, that method allows to pass a parameter of type File.
The file is generated in the process. There is no need to store the file on the server. So it would be great if the file could be sent by e-mail without storing the file in the file system.
If I have to store the file… Is there a way to store the file only temporarily and delete the file after sending the e-mail?
Thanks for any hint!
Best regards,
Kerstin