jodd-mail/src/main/java/jodd/mail/EMLComposer.java
public String compose(final ReceivedEmail receivedEmail) {
		Message msg = receivedEmail.originalMessage();

		final ByteArrayOutputStream outputStream = new ByteArrayOutputStream();

		try {
			msg.writeTo(outputStream);
		} catch (IOException | MessagingException e) {
			throw new MailException(e);
		}

		return outputStream.toString();
	}
public String compose(final ReceivedEmail receivedEmail) {
		Message msg = receivedEmail.originalMessage();

		final ByteArrayOutputStream outputStream = new ByteArrayOutputStream();

		try {
			msg.writeTo(outputStream);
		} catch (IOException | MessagingException e) {
			throw new MailException(e);
		}

		return outputStream.toString();
	}
Creates EML string from given {@link ReceivedEmail}.

@param receivedEmail {@link ReceivedEmail} from which to create EML {@link String}.
@return {@link String} with EML content.