Bug 1735938 - for account setup manual edit, honor the user set port when re-testing. r=aleca a=wsmwk
authorMagnus Melin <mkmelin+mozilla@iki.fi>
Thu, 11 Nov 2021 12:01:31 +0200
changeset 44661 bf9290ca667516e578262e4a3840e04f2852ab4e
parent 44660 5bb1de88a6abc0214d92d971557f3a6a25b24c3d
child 44662 7fa97d9e37120522f37f450c46c0230e2ce46fe7
push id3381
push userthunderbird@calypsoblue.org
push dateFri, 12 Nov 2021 18:36:41 +0000
treeherdercomm-beta@7ff87d7f1e1a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersaleca, wsmwk
bugs1735938
Bug 1735938 - for account setup manual edit, honor the user set port when re-testing. r=aleca a=wsmwk Differential Revision: https://phabricator.services.mozilla.com/D130868
mail/components/accountcreation/content/accountSetup.js
--- a/mail/components/accountcreation/content/accountSetup.js
+++ b/mail/components/accountcreation/content/accountSetup.js
@@ -1446,19 +1446,20 @@ var gAccountSetup = {
     ).value;
 
     // Outgoing server
 
     config.outgoing.username = document.getElementById(
       "outgoingUsername"
     ).value;
 
-    let smtpValue = document.getElementById("outgoingHostname").value;
+    let smtpHostname = document.getElementById("outgoingHostname").value;
+    let smtpPort = document.getElementById("outgoingPort").value;
     let foundServer = MailServices.smtp.servers.find(
-      s => s.hostname == smtpValue
+      s => s.hostname == smtpHostname && s.port == smtpPort
     );
     // If the user is using a preconfigured SMTP server.
     if (foundServer) {
       config.outgoing.existingServerKey = foundServer.key;
       config.outgoing.existingServerLabel = foundServer.hostname;
       config.outgoing.addThisServer = false;
       config.outgoing.useGlobalPreferredServer = false;