return message;
}
protected void send(Message message) throws NoSuchProviderException,
MessagingException {
SMTPTransport smtpTransport = (SMTPTransport) getSession()
.getTransport(getProtocol());
if (emailTransportConfig.isAuthenticationRequired()) {
smtpTransport.connect(emailTransportConfig.getSmtpServer(),
emailTransportConfig.getUsername(), emailTransportConfig
.getPassword());
} else {
smtpTransport.connect();
}
smtpTransport.sendMessage(message, message.getAllRecipients());
smtpTransport.close();
}