This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
Call the setDisposition(PART.ATTACHMENT) method on the body part
Let me know if I am wrong ! <img src="smile.gif" border="0">
Joined: May 23, 2002
I do this, but the file is still coming in the body part and not as an attachment... : ... MimeBodyPart mbp2 = new MimeBodyPart(); FileDataSource fds = new FileDataSource(pFile); mbp2.setDataHandler(new DataHandler(fds)); mbp2.setFileName(pFile); // create the Multipart and its parts to it Multipart mp = new MimeMultipart(); mbp2.setDisposition(Part.ATTACHMENT); mp.addBodyPart(mbp1); mp.addBodyPart(mbp2); msg.setContent(mp); ... whats wrong with that code? *A*