if (accountKeyList.IsEmpty()) accountKeyList = key; else { accountKeyList += ","; accountKeyList += key; }  rv = getPrefService(); if (NS_SUCCEEDED(rv)) m_prefs->SetCharPref(PREF_MAIL_ACCOUNTMANAGER_ACCOUNTS, accountKeyList.GetBuffer());
nsMsgAccountManager::createKeyedAccount(const char* key,                                        nsIMsgAccount ** aAccount){      nsIMsgAccount *account = nsnull;  nsresult rv;  rv = nsComponentManager::CreateInstance(kMsgAccountCID,                                          nsnull,                                          NS_GET_IID(nsIMsgAccount),                                          (void **)&account);    if (NS_FAILED(rv)) return rv;  account->SetKey(NS_CONST_CAST(char*,(const char*)key));  m_accounts->AppendElement(NS_STATIC_CAST(nsISupports*, account));  *aAccount = account;  NS_ADDREF(*aAccount);    return NS_OK;}