0

How do I send an email with attachment?

Share:

In this example we create a small program to send email with a file attachment. To send message with attachment we need to create an email with javax.mail.Multipart object which basically will contains the email text message and then add a file to the second block, which both of them is an object of javax.mail.internet.MimeBodyPart. In this example we also use the javax.activation.FileDataSource.

Filed in: Java Mail

Leave a Reply

Submit Comment

© 2014 Java Examples - Developed with