I am trying to attach file in my mail app. but all time only body has been sent.I am using method:
public void addAttachment(String path) throws Exception
BodyPart messageBodyPart = new MimeBodyPart();
DataSource dataSource = new FileDataSource(path);
Multipart multipart = new MimeMultipart();
I have used two jar file mail.jar, activation.jar. mail body is working fine. but attachment is not reached. please help me.
Thanks in andvance.
Your method looks the exact same as what I use and works.
But what I want to know is how you're calling the method?
Or something like that?