From 2f49e16ccf87d9d81f8f2ceaa744cb1fe75e3abe Mon Sep 17 00:00:00 2001 From: "alecf%netscape.com" Date: Mon, 20 Sep 1999 02:11:19 +0000 Subject: [PATCH] make the account wizard use the new SMTP stuff --- mailnews/base/prefs/resources/content/AccountWizard.js | 10 ++++++++++ mailnews/base/prefs/resources/content/aw-server.xul | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/mailnews/base/prefs/resources/content/AccountWizard.js b/mailnews/base/prefs/resources/content/AccountWizard.js index 60e9f35af09..fcf9aca9c64 100644 --- a/mailnews/base/prefs/resources/content/AccountWizard.js +++ b/mailnews/base/prefs/resources/content/AccountWizard.js @@ -35,6 +35,7 @@ var currentPageTag; var contentWindow; var wizardContents; +var smtpService; function init() { if (!contentWindow) contentWindow = window.frames["wizardContents"]; @@ -42,6 +43,12 @@ function init() { } // event handlers function onLoad() { + if (!smtpService) + smtpService = + Components.classes["component://netscape/messengercompose/smtp"].getService(Components.interfaces.nsISmtpService);; + + wizardContents["smtp.hostname"] = smtpService.defaultServer.hostname; + dump("initialized with " + wizardContents["smtp.hostname"] + "\n"); init(); } @@ -132,6 +139,7 @@ function saveContents(win, hash) { function restoreValue(hash, element) { if (!hash[element.name]) return; + dump("Restoring " + element.name + " from " + hash[element.name] + "\n"); if (element.type=="radio") { if (hash[element.name] == element.value) element.checked=true; @@ -220,6 +228,8 @@ function createAccount(hash) { identity[slot] = hash[i]; else if (type == "server") server[slot] = hash[i]; + else if (type == "smtp") + smtpService.defaultServer.hostname = hash[i]; } var account = am.createAccount(); diff --git a/mailnews/base/prefs/resources/content/aw-server.xul b/mailnews/base/prefs/resources/content/aw-server.xul index e481fe9355c..47b7bc1631b 100644 --- a/mailnews/base/prefs/resources/content/aw-server.xul +++ b/mailnews/base/prefs/resources/content/aw-server.xul @@ -59,7 +59,7 @@ Rights Reserved. &smtpServerDesc.label; &smtpServerLabel.label; - +