jodd-mail/src/main/java/jodd/mail/ReceivedEmail.java
protected void parseMessage(final Message msg, final boolean envelope) throws MessagingException, IOException {
		// flags
		flags(msg.getFlags());

		// message number
		messageNumber(msg.getMessageNumber());

		if (msg instanceof MimeMessage) {
			messageId(((MimeMessage) msg).getMessageID());
		}


		// single from
		final Address[] addresses = msg.getFrom();

		if (addresses != null && addresses.length > 0) {
			from(addresses[0]);
		}

		// reply-to
		replyTo(msg.getReplyTo());

		// recipients
		to(msg.getRecipients(Message.RecipientType.TO));
		cc(msg.getRecipients(Message.RecipientType.CC));
		// no BCC because this will always be empty

		// subject
		subject(msg.getSubject());

		// dates
		receivedDate(msg.getReceivedDate());
		sentDate(msg.getSentDate());

		// headers
		headers(msg.getAllHeaders());

		// content
		if (!envelope) {
			processPart(msg);
		}
	}
protected void parseMessage(final Message msg, final boolean envelope) throws MessagingException, IOException {
		// flags
		flags(msg.getFlags());

		// message number
		messageNumber(msg.getMessageNumber());

		if (msg instanceof MimeMessage) {
			messageId(((MimeMessage) msg).getMessageID());
		}


		// single from
		final Address[] addresses = msg.getFrom();

		if (addresses != null && addresses.length > 0) {
			from(addresses[0]);
		}

		// reply-to
		replyTo(msg.getReplyTo());

		// recipients
		to(msg.getRecipients(Message.RecipientType.TO));
		cc(msg.getRecipients(Message.RecipientType.CC));
		// no BCC because this will always be empty

		// subject
		subject(msg.getSubject());

		// dates
		receivedDate(msg.getReceivedDate());
		sentDate(msg.getSentDate());

		// headers
		headers(msg.getAllHeaders());

		// content
		if (!envelope) {
			processPart(msg);
		}
	}
protected void parseMessage ( final Message msg , final boolean envelope ) throws MessagingException , IOException { // flags flags ( msg . getFlags ( ) ) ; // message number messageNumber ( msg . getMessageNumber ( ) ) ; if ( msg instanceof MimeMessage ) { messageId ( ( ( MimeMessage ) msg ) . getMessageID ( ) ) ; } // single from final Address [ ] addresses = msg . getFrom ( ) ; if ( addresses != null && addresses . length > 0 ) { from ( addresses [ 0 ] ) ; } // reply-to replyTo ( msg . getReplyTo ( ) ) ; // recipients to ( msg . getRecipients ( Message . RecipientType . TO ) ) ; cc ( msg . getRecipients ( Message . RecipientType . CC ) ) ; // no BCC because this will always be empty // subject subject ( msg . getSubject ( ) ) ; // dates receivedDate ( msg . getReceivedDate ( ) ) ; sentDate ( msg . getSentDate ( ) ) ; // headers headers ( msg . getAllHeaders ( ) ) ; // content if ( ! envelope ) { processPart ( msg ) ; } }
Parses {@link Message} and extracts all data for the received message.

@param msg {@link Message} to parse.
@throws IOException        if there is an error with the content
@throws MessagingException if there is an error.
Parses { @link Message } and extracts all data for the received message .