How to send an email with attachment?
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