*/
public void sendMessage( GWTMessage message ) throws Exception {
try {
log.debug( "sending message..." );
MessageHandler messageHandler = SessionManager.get().getCurrentComposeMessage();
messageHandler.setGWTMessage( message );
messageHandler.send();
IMailbox mailbox = SessionManager.get().getMailbox();
IMailFolder sentFolder = mailbox.getSentFolder();
messageHandler.saveToFolder( sentFolder, false );
log.debug( "...successful" );
try {
getUserAccountDao().saveRecipients( SessionManager.get().getUserAccount(),
messageHandler.getAllRecipients() );
}
catch (Throwable e) {
// catch all exceptions
log.error( e.getMessage(), e );
}