JavaMail Question:

Download Job Interview Questions and Answers PDF

What is the use of MIME within message makeup?

JavaMail Interview Question
JavaMail Interview Question

Answer:

MIME message includes the picture stored as file in GIF format and the GIF format uses 8-bit format. The RFC 822 uses ASCII text format. The messages in the form of ASCII text format is to be encoded. To display the image in the recipient system, the information abut the encoding mechanism is used. The message is to be made up in the recipient’s application. The following snippet is used to identify the content is a GIF file which is to be encoded using the standard “base64Algorithm. This is to be treated as an attachment by the client who uses the email.

Content-Type: image/gif;
name="waterfall.gif"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="waterfall.gif"
[Author the encoded content here]
..

The accomplishment of this is done by simplifying and rebuilding of complex files. These files are encoded and transported as a body of the message or a series of messages which are the parts of the file.

A message format is defined by the MIME that allows the following:

Non ASCII character textual message bodies.
Non textual message bodies
Message bodies that are multipart
Non ASCII character textual header information

Download JavaMail Interview Questions And Answers PDF

Previous QuestionNext Question
Explain POP, SMTP and IMAP protocols?What is the structure of JavaMail API?