transport.sendMessage(msg, msg.getAllRecipients());
transport.close();
}
catch (MessagingException ex)
{
throw new CommunicationsException("ERROR sending email message. " + ex.getMessage(), ex);
}
catch (UnsupportedEncodingException ex)
{
throw new CommunicationsException("ERROR encoding mail address (mail: " + this.fromAddress + ", name: " + this.fromName + "). " + ex.getMessage(), ex);
}
}