final URLName smtpUrlName = options.genSmtpUrlName();
log.debug("Opening transport to: " + smtpUrlName);
final Transport transport = session.getTransport(smtpUrlName);
transport.connect(smtpUrlName.getHost(), smtpUrlName.getPort(),
smtpUrlName.getUsername(), smtpUrlName.getPassword());
transport.sendMessage(msg, msg.getAllRecipients());
transport.close();
log.info("Message sent");
} catch (Exception e) {
log.error("Unable to send message", e);
} finally {