Oct 22, 2018

[HDGEM] How to add Attachments to Email in java using outputstream

ByteArrayOutputStream baos = //Read the output stream  DataSource aAttachment = new  ByteArrayDataSource(baos.toByteArray(),"application/octet-stream");  MimeBodyPart attachmentPart = new MimeBodyPart();    attachmentPart.setDataHandler(new DataHandler(aAttachment));


--
Posted By Blogger to HDGEM at 1/11/2017 11:28:00 AM