Getting the message contents |
You may get the contents of a MIME message using the MimeMessage#getMessage method. This will return a byte[] containing the data representing the message to include all headers and parts.
Example
// get contents of message byte[] data = message.getMessage();
// print to console System.out.println(new String(data)); |