*aResult = nsnull;
nsMsgAccountManager::FindAccountForServer(nsIMsgIncomingServer *server,                                            nsIMsgAccount **aResult){  nsresult rv;  *aResult = nsnull;  nsXPIDLCString key;  rv = server->GetKey(getter_Copies(key));  if (NS_FAILED(rv)) return rv;    findAccountByKeyEntry entry;  entry.key = key;  entry.account = nsnull;  m_accounts->EnumerateForwards(findAccountByServerKey, (void *)&entry);  if (entry.account) {    *aResult = entry.account;    NS_ADDREF(*aResult);  }  return NS_OK;}