Bug 1401026 - user real server name instead of account name (pretty name) for IMAP alerts. r=frg a=jorgk
authorJorg K <jorgk@jorgk.com>
Tue, 19 Sep 2017 20:13:00 +0200
changeset 28606 1e947b81c3f74b8a4eff17186bf7a74b30f1499c
parent 28605 7b6daa02a908409623dccd98f9ca63fc1ed34500
child 28607 eca90d4a27d2e1e30c7ddcfddddda5be2227b967
push idunknown
push userunknown
push dateunknown
reviewersfrg, jorgk
bugs1401026
Bug 1401026 - user real server name instead of account name (pretty name) for IMAP alerts. r=frg a=jorgk
mailnews/imap/src/nsImapIncomingServer.cpp
--- a/mailnews/imap/src/nsImapIncomingServer.cpp
+++ b/mailnews/imap/src/nsImapIncomingServer.cpp
@@ -1894,21 +1894,21 @@ nsImapIncomingServer::FEAlertWithName(co
     return NS_OK;
 
   GetStringBundle();
 
   nsString message;
 
   if (m_stringBundle)
   {
-    nsAutoString hostName;
-    nsresult rv = GetPrettyName(hostName);
+    nsAutoCString hostName;
+    nsresult rv = GetHostName(hostName);
     if (NS_SUCCEEDED(rv))
     {
-      const char16_t *params[] = { hostName.get() };
+      const char16_t *params[] = { NS_ConvertUTF8toUTF16(hostName).get() };
       rv = m_stringBundle->FormatStringFromName(
         aMsgName,
         params, 1,getter_Copies(message));
       if (NS_SUCCEEDED(rv))
         return AlertUser(message, aUrl);
     }
   }