PRUnichar *passwordTemplate = IMAPGetStringByID(IMAP_ENTER_PASSWORD_PROMPT); PRUnichar *passwordText = nsnull; nsXPIDLCString hostName; nsXPIDLCString userName;  GetHostName(getter_Copies(hostName)); GetUsername(getter_Copies(userName));  passwordText = nsTextFormater::smprintf(passwordTemplate, (const char *) userName, (const char *) hostName); nsresult rv =  GetPasswordWithUI(passwordText, aPassword); nsTextFormater::smprintf_free(passwordText); nsCRT::free(passwordTemplate); return rv;
return GetPassword(PR_TRUE, aPassword);
NS_IMETHODIMP nsImapIncomingServer::PromptForPassword(char ** aPassword){    PRUnichar *passwordTemplate = IMAPGetStringByID(IMAP_ENTER_PASSWORD_PROMPT);    PRUnichar *passwordText = nsnull;    nsXPIDLCString hostName;    nsXPIDLCString userName;    GetHostName(getter_Copies(hostName));    GetUsername(getter_Copies(userName));    passwordText = nsTextFormater::smprintf(passwordTemplate, (const char *) userName, (const char *) hostName);    nsresult rv =  GetPasswordWithUI(passwordText, aPassword);    nsTextFormater::smprintf_free(passwordText);    nsCRT::free(passwordTemplate);    return rv;}