protected void populate ( MimeMessage message ) throws MessagingException { // add all of the to addresses. message . addRecipients ( Message . RecipientType . TO , toSet . toInternetAddressArray ( ) ) ; message . addRecipients ( Message . RecipientType . CC , ccSet . toInternetAddressArray ( ) ) ; message . addRecipients ( Message . RecipientType . BCC , bccSet . toInternetAddressArray ( ) ) ; message . setFrom ( from ) ; if ( replyTo != null ) { message . setReplyTo ( new InternetAddress [ ] { replyTo } ) ; } if ( subject != null ) { message . setSubject ( subject ) ; } }
Populates a mime message with the recipient addresses from address reply to address and the subject .