*/
public GWTMessageList retrieveMessages( String folderId, int start, int pageSize, String sortField, String dir,
String[][] params ) throws Exception {
if ( folderId != null ) {
IMailbox mailbox = SessionManager.get().getMailbox();
UserAccount account = SessionManager.get().getUserAccount();
log.debug( "retrieving messages from " + folderId + " ..." );
try {
IMailFolder currentFolder = mailbox.getMailFolderById( folderId );
mailbox.setCurrentFolder( currentFolder );
Message[] msgs = currentFolder.retrieveMessages( sortField );
String quickSearchFields = MessageUtils.getParamValue( params, "fields" );
String extendedSearchFields = MessageUtils.getParamValue( params,