* com.cubusmail.gwtui.client.services.IMailboxService#copyMoveMessages(
* long[], java.lang.String, boolean)
*/
public void copyMoveMessages( long[] messageIds, String targetFolderId, boolean toMove ) throws Exception {
IMailbox mailbox = SessionManager.get().getMailbox();
if ( messageIds != null && messageIds.length > 0 ) {
log.debug( "copy/move " + messageIds.length + " messages..." );
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() );