I want to create a Java File object in memory (without creating a physical file) and populate its content with a byte array.
Can this be done?
T
It is important to create the MimeMessageHelper object correctly to support attachments and inline resources.
Example: MimeMessageHelper helper = new MimeMessageHelper(message, true, "UTF-8");
In this example since multipart is set to true MULTIPART_MODE_MIXED_RELATED will be used and attachments and inline resouces will be supported.