m_accountsLoaded = PR_TRUE;
nsCOMPtr<nsIMsgBiffManager> biffService = do_GetService(NS_MSGBIFFMANAGER_CONTRACTID, &rv);  if (NS_SUCCEEDED(rv)) biffService->Init();   nsCOMPtr<nsIMsgPurgeService> purgeService = do_GetService(NS_MSGPURGESERVICE_CONTRACTID, &rv);  if (NS_SUCCEEDED(rv)) purgeService->Init();     nsCOMPtr<nsIMessengerOSIntegration> integrationService = do_GetService(NS_MESSENGEROSINTEGRATION_CONTRACTID, &rv);
nsMsgAccountManager::LoadAccounts(){  nsresult rv;  // for now safeguard multiple calls to this function  if (m_accountsLoaded)    return NS_OK;    m_accountsLoaded = PR_TRUE;  // mail.accountmanager.accounts is the main entry point for all accounts  nsXPIDLCString accountList;  rv = getPrefService();  if (NS_SUCCEEDED(rv)) {    rv = m_prefs->CopyCharPref(PREF_MAIL_ACCOUNTMANAGER_ACCOUNTS,                                        getter_Copies(accountList));  }    if (NS_FAILED(rv) || !accountList || !accountList[0]) {#ifdef DEBUG_ACCOUNTMANAGER    printf("No accounts.\n");#endif    return NS_OK;  }    /* parse accountList and run loadAccount on each string, comma-separated */#ifdef DEBUG_ACCOUNTMANAGER    printf("accountList = %s\n", (const char*)accountList);#endif       nsCOMPtr<nsIMsgAccount> account;    char *token = nsnull;    char *rest = NS_CONST_CAST(char*,(const char*)accountList);    nsCAutoString str;    token = nsCRT::strtok(rest, ",", &rest);    while (token && *token) {      str = token;      str.StripWhitespace();            if (!str.IsEmpty()) {          rv = GetAccount(str.GetBuffer(), getter_AddRefs(account));      }      token = nsCRT::strtok(rest, ",", &rest);    }    /* finished loading accounts */    return NS_OK;}