private void setFrom ( Email email , MimeMessage mimeMsg ) throws MessagingException , AddressException , UnsupportedEncodingException { if ( email . getFrom ( ) == null ) { throw new IllegalArgumentException ( "The sender address has not been set" ) ; } mimeMsg . setFrom ( toInternetAddress ( email . getFrom ( ) ) ) ; }
Set the sender address on the mime message .