try {
mailbox.copyMessages( messageIds, targetFolderId );
log.debug( "...successful" );
if ( toMove ) {
mailbox.deleteMessages( messageIds );
}
}
catch (MessagingException e) {
log.error( e.getMessage(), e );
throw new GWTMessageException( e.getMessage() );