Purpose File Data Source
FileDataSource filedatasource = new FileDataSource(filename);
messagebodypart2.setDataHandler(new DataHandler(filedatasource));
messagebodypart2.setFileName(filedatasource.getName ());
Multipart multipart = new MimeMultipart();
multipart.addBodyPart(messagebodypart1);
multipart.addBodyPart(messagebodypart2);
message.setContent(multipart);
What is the purpose of the above code while writing a mail program ? More specifically what is the purpose of FileDataSource ?
Thanks in advance

