fix 359882 autoconfig checking for e-mail identity doesn't work if default account has multiple identities, sr=mscott

git-svn-id: svn://10.0.0.236/trunk@215983 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bienvenu%nventure.com
2006-11-28 18:02:18 +00:00
parent 39e5caf94b
commit 5231945dc5

View File

@@ -526,6 +526,9 @@ nsresult nsAutoConfig::getEmailAddr(nsACString & emailAddr)
getter_Copies(prefValue));
if (NS_FAILED(rv) || prefValue.IsEmpty())
return PromptForEMailAddress(emailAddr);
PRInt32 commandIndex = prefValue.FindChar(',');
if (commandIndex != kNotFound)
prefValue.Truncate(commandIndex);
emailAddr = NS_LITERAL_CSTRING("mail.identity.") +
prefValue + NS_LITERAL_CSTRING(".useremail");
rv = mPrefBranch->GetCharPref(PromiseFlatCString(emailAddr).get(),