I have the following class called sendAttachment.java, and also Piechart.java, and covertExcelTOCSV.java. I am reading in an els file converting it to csv and then having pi
Add this:
fileDataSource.getOutputStream().close();
after you have created and used FileDataSource object in your code. It should fix the problem (assuming fileDataSource is a FileDataSource object)
check out : http://kenai.com/projects/javamail/sources/mercurial/content/mail/src/main/java/javax/mail/internet/MimeUtility.java?rev=469
also if you are sending attachments in the multipart message first try zipping them in your code and then send . You had encoding issues in this problem , these encoders are friendly with .zips .