InputStream in = new BufferedInputStream(new FileInputStream(file));
MimeBodyPart attPart;
try {
attPart = new MimeBodyPart();
attPart.setDataHandler(new DataHandler(new ByteArrayDataSource(in, "application/foo")));
attPart.setFileName(file.getName());
attPart.setHeader("Content-ID", file.getName());
attPart.setDisposition(Part.ATTACHMENT);
multipart.addBodyPart(attPart);
} catch (MessagingException e3) {