This Example shows you how to send multipart mail using java mail. Multipart is like a container that holds one or more body parts. When u send a multipart mail firstly create a Multipart class object and then create BodyPart class object, set text in BodyPart class object and add all BodyPart class object in Multipart class object and send the message. Class Multipart that we will use in this code is an abstract class. Method used in this program of Multipart class is.....
void addBodyPart(BodyPart part);
This method is used to add parts in multipart.
SendMultipartMail.java
|
Output:
Message send.... |
|
Recommend the tutorial |
Ask Questions? Discuss: Send multipart mail using java mail
Post your Comment