public static MimeMessage emlToMimeMessage(@Nonnull final String eml, @Nonnull final Session session) {
		checkNonEmptyArgument(session, "session");
		checkNonEmptyArgument(eml, "eml");
		try {
			return new MimeMessage(session, new ByteArrayInputStream(eml.getBytes(UTF_8)));
		} catch (final MessagingException e) {
			throw new EmailConverterException(format(EmailConverterException.PARSE_ERROR_EML, e.getMessage()), e);
		}
	}
public static MimeMessage emlToMimeMessage ( @ Nonnull final String eml , @ Nonnull final Session session ) { checkNonEmptyArgument ( session , "session" ) ; checkNonEmptyArgument ( eml , "eml" ) ; try { return new MimeMessage ( session , new ByteArrayInputStream ( eml . getBytes ( UTF_8 ) ) ) ; } catch ( final MessagingException e ) { throw new EmailConverterException ( format ( EmailConverterException . PARSE_ERROR_EML , e . getMessage ( ) ) , e ) ; } }
Relies on JavaMail's native parser of EML data, {@link MimeMessage#MimeMessage(Session, InputStream)}.