summaryrefslogtreecommitdiff
path: root/mailnews/base
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2019-11-11 01:26:42 -0500
committerMatt A. Tobin <email@mattatobin.com>2019-11-11 01:26:42 -0500
commitdc46cd9eccfd6555626868e9d526ad52927ec1ef (patch)
tree5baef1316cad3e78b15512d259076d93cf9bd267 /mailnews/base
parent7047b11cf0126c784fca3aab78d78cd2d85d7d8f (diff)
downloaduxp-dc46cd9eccfd6555626868e9d526ad52927ec1ef.tar.gz
Bug 1315662 - delete SMTP server login credentials when deleting the account or if hostname/username changes.
Tag #1273
Diffstat (limited to 'mailnews/base')
-rw-r--r--mailnews/base/prefs/content/am-smtp.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/mailnews/base/prefs/content/am-smtp.js b/mailnews/base/prefs/content/am-smtp.js
index f107a32ae5..44580bc204 100644
--- a/mailnews/base/prefs/content/am-smtp.js
+++ b/mailnews/base/prefs/content/am-smtp.js
@@ -54,6 +54,11 @@ var gSmtpServerListWindow =
if (!cancel)
{
+ // Remove password information first.
+ try {
+ server.forgetPassword();
+ } catch (e) { /* It is OK if this fails. */ }
+ // Remove the server.
MailServices.smtp.deleteServer(server);
parent.replaceWithDefaultSmtpServer(server.key);
this.refreshServerList("", true);