Which of the following would successfully embed the image into the body in the next line?

Given:

BodyPart msgPart = new MimeBodyPart();
msgPart.setContent(” This is embed text with <img src=\”cid:embeddedImage\”> as the embedded
image”);
MimeMultipart multipart = new MimeMultipart(“related”);
multipart.addBodyPart(msgPart);
msgPart = new MimeBodyPart();
DataSource fds = new FileDataSource(file);
msgPart.setDataHandler( new DataHandler(fds));
Which of the following would successfully embed the image into the body in the next line?

Given:

BodyPart msgPart = new MimeBodyPart();
msgPart.setContent(” This is embed text with <img src=\”cid:embeddedImage\”> as the embedded
image”);
MimeMultipart multipart = new MimeMultipart(“related”);
multipart.addBodyPart(msgPart);
msgPart = new MimeBodyPart();
DataSource fds = new FileDataSource(file);
msgPart.setDataHandler( new DataHandler(fds));
Which of the following would successfully embed the image into the body in the next line?

A.
msgPart.setHeader(“MultipartDataSource”,msgPart);

B.
msgPart.setHeader(“DataSource”,fds);

C.
msgPart.setHeader(“Content-ID”,”embeddedImage”);

D.
msgPart.setHeader(“MimeMultiPart”,”related”);



Leave a Reply 0

Your email address will not be published. Required fields are marked *