auth = null;
}
final Session session = Session.getInstance(props, auth);
session.setDebug(isDebug());
final Transport transport = session.getTransport("smtp");
try {
transport.connect();
int count = _addresses.size();
for (int i = 0; i < count; i++) {
final String mailAddress = _addresses.get(i);
final InternetAddress[] addressTo = new InternetAddress[1];
addressTo[0] = new InternetAddress(mailAddress);
final InternetAddress addressFrom = new InternetAddress(_from);
// Construct the message
final Message msg = new MimeMessage(session);
msg.setSentDate(new Date());
msg.setDescription(MSG_DESCRIPTION);
msg.setFrom(addressFrom);
msg.setReplyTo(new InternetAddress[] {addressFrom});
msg.setRecipients(Message.RecipientType.TO, addressTo);
msg.setSubject(_subject);
//msg.setContent(_message, _mailFormat.toString());
final Multipart mp = this.getMailMultiPart();
msg.setContent(mp);
// Send the message
Transport.send(msg);
}
return true;
} finally {
try {
transport.close();
} catch (MessagingException ex) {
}
}
} catch (Throwable t) {
final String msg = StringUtils.format("SEND EMAIL ERROR: " +