code: public static String messageAsText(final Message message, final boolean includeHeaders) {
  		try {
  			StrBuilder sb = new StrBuilder(300);
  
  			if (includeHeaders) {
  				@SuppressWarnings("unchecked")
  				Enumeration<Header> headers = message.getAllHeaders();
  				while (headers.hasMoreElements()) {
  					Header header = headers.nextElement();
  					sb.append(header.getName()).append('=').appendln(header.getValue());
  				}
  
  				sb.appendln("");
  			}
  
  			Object content = message.getContent();
  			if (content instanceof String) {
  				String body = (String) content;
  				sb.appendln(body);
  				sb.appendln("");
  			} else if (content instanceof Multipart) {
  				parseMultipart(sb, (Multipart) content);
  			}
  			return sb.toString();
  		} catch (MessagingException ex) {
  			throw new MailException("Error getting mail content.", ex);
  		} catch (IOException ex) {
  			throw new MailException("Error getting mail content.", ex);
  		}
  	}
docs: Returns the specified message as text.
  
  @param message
  the message
  @param includeHeaders
  specifies whether message headers are to be included in the returned text
  @return the message text