Account acct = Provisioning.getInstance().get(AccountBy.NAME, str);
Account acct = Provisioning.getInstance().get(AccountBy.name, str);
    int getMailboxIdFromString(String str) throws ServiceException {        if (str != null && !str.equals("")) {            if (str.indexOf('@') >= 0) {                // account                Account acct = Provisioning.getInstance().get(AccountBy.NAME, str);                Mailbox mbx = Mailbox.getMailboxByAccountId(acct.getId());                return mbx.getId();            } else {                return Integer.parseInt(str);            }        }        return 0;    }