InputStream is=httpConn.getInputStream();//download PDF file from
internet
ByteArrayDataSource ds = new ByteArrayDataSource(is, "application/
pdf");
MimeBodyPart attachment= new MimeBodyPart();
Properties props = new Properties();
Session session = Session.getDefaultInstance(props, null);
try {
Message msg = new MimeMessage(session);
attachment.setDataHandler(new DataHandler(ds));
attachment.setFileName("Report.pdf");
Multipart mp = new MimeMultipart();
mp.addBodyPart(attachment);
msg.setContent(mp);
msg.setFrom(new InternetAddress("..", ".."));
msg.addRecipient(Message.RecipientType.TO,new InternetAddress("..",
".."));
msg.setSubject("..");
Transport.send(msg);
} catch ..