jodd-mail/src/main/java/jodd/mail/ReceivedEmail.java
private void addStringContent(final Part part, final String content) throws MessagingException, UnsupportedEncodingException {
		final String contentType = part.getContentType();
		final String encoding = EmailUtil.extractEncoding(contentType, StringPool.US_ASCII);

		final String disposition = part.getDisposition();

		if (disposition != null && disposition.equalsIgnoreCase(Part.ATTACHMENT)) {
			addAttachment(part, content.getBytes(encoding));
		} else {
			final String mimeType = EmailUtil.extractMimeType(contentType);
			message(content, mimeType, encoding);
		}
	}
private void addStringContent(final Part part, final String content) throws MessagingException, UnsupportedEncodingException {
		final String contentType = part.getContentType();
		final String encoding = EmailUtil.extractEncoding(contentType, StringPool.US_ASCII);

		final String disposition = part.getDisposition();

		if (disposition != null && disposition.equalsIgnoreCase(Part.ATTACHMENT)) {
			addAttachment(part, content.getBytes(encoding));
		} else {
			final String mimeType = EmailUtil.extractMimeType(contentType);
			message(content, mimeType, encoding);
		}
	}
private void addStringContent ( final Part part , final String content ) throws MessagingException , UnsupportedEncodingException { final String contentType = part . getContentType ( ) ; final String encoding = EmailUtil . extractEncoding ( contentType , StringPool . US_ASCII ) ; final String disposition = part . getDisposition ( ) ; if ( disposition != null && disposition . equalsIgnoreCase ( Part . ATTACHMENT ) ) { addAttachment ( part , content . getBytes ( encoding ) ) ; } else { final String mimeType = EmailUtil . extractMimeType ( contentType ) ; message ( content , mimeType , encoding ) ; } }
Adds String content as either {@link EmailAttachment} or as {@link EmailMessage}.

@param part    {@link Part}
@param content Content as {@link String}
@throws MessagingException           if there is a failure.
@throws UnsupportedEncodingException if the named charset is not supported.
@see #message(String, String, String)
Adds String content as either { @link EmailAttachment } or as { @link EmailMessage } .