jodd-mail/src/main/java/jodd/mail/SendMailSession.java
private void setRecipients(final Email emailWithData, final MimeMessage msgToSet) throws MessagingException {
		// TO
		final InternetAddress[] to = EmailAddress.convert(emailWithData.to());
		if (to.length > 0) {
			msgToSet.setRecipients(RecipientType.TO, to);
		}

		// CC
		final InternetAddress[] cc = EmailAddress.convert(emailWithData.cc());
		if (cc.length > 0) {
			msgToSet.setRecipients(RecipientType.CC, cc);
		}

		// BCC
		final InternetAddress[] bcc = EmailAddress.convert(emailWithData.bcc());
		if (bcc.length > 0) {
			msgToSet.setRecipients(RecipientType.BCC, bcc);
		}
	}
private void setRecipients(final Email emailWithData, final MimeMessage msgToSet) throws MessagingException {
		// TO
		final InternetAddress[] to = EmailAddress.convert(emailWithData.to());
		if (to.length > 0) {
			msgToSet.setRecipients(RecipientType.TO, to);
		}

		// CC
		final InternetAddress[] cc = EmailAddress.convert(emailWithData.cc());
		if (cc.length > 0) {
			msgToSet.setRecipients(RecipientType.CC, cc);
		}

		// BCC
		final InternetAddress[] bcc = EmailAddress.convert(emailWithData.bcc());
		if (bcc.length > 0) {
			msgToSet.setRecipients(RecipientType.BCC, bcc);
		}
	}
private void setRecipients ( final Email emailWithData , final MimeMessage msgToSet ) throws MessagingException { // TO final InternetAddress [ ] to = EmailAddress . convert ( emailWithData . to ( ) ) ; if ( to . length > 0 ) { msgToSet . setRecipients ( RecipientType . TO , to ) ; } // CC final InternetAddress [ ] cc = EmailAddress . convert ( emailWithData . cc ( ) ) ; if ( cc . length > 0 ) { msgToSet . setRecipients ( RecipientType . CC , cc ) ; } // BCC final InternetAddress [ ] bcc = EmailAddress . convert ( emailWithData . bcc ( ) ) ; if ( bcc . length > 0 ) { msgToSet . setRecipients ( RecipientType . BCC , bcc ) ; } }
Sets TO, CC and BCC in msgToSet with TO, CC and BCC from emailWithData.

@param emailWithData {@link Email} with data
@param msgToSet      {@link MimeMessage} to set data into.
@throws MessagingException if there is a failure.
Sets TO CC and BCC in msgToSet with TO CC and BCC from emailWithData .