[Tickets #923] NEW: Patch to allow specifying per-server SMTP port

bugs at bugs.horde.org bugs at bugs.horde.org
Wed Dec 1 01:46:01 PST 2004


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/?id=923
-----------------------------------------------------------------------
 Ticket     | 923
 Created By | bergonz at labs.it
 Summary    | Patch to allow specifying per-server SMTP port
 Queue      | IMP
 Version    | 3.2.6
 State      | New
 Priority   | 1. Low
 Type       | Enhancement
 Owners     | 
-----------------------------------------------------------------------


bergonz at labs.it (2004-12-01 01:46) wrote:

Due to a strange setup I have here, I needed to specify  per-server SMTP
port. Here is the trivial patch:

*** lib/IMP.php.orig        2004-12-01 10:38:37.000000000 +0100
--- lib/IMP.php     2004-12-01 10:32:25.000000000 +0100
***************
*** 87,92 ****
--- 87,96 ----
                  !empty($servers[$server]['smtphost'])) {
                  $_SESSION['imp']['smtphost'] =
$servers[$server]['smtphost'];
              }
+             if (($conf['mailer']['type'] == 'smtp') &&
+                 !empty($servers[$server]['smtpport'])) {
+                 $_SESSION['imp']['smtpport'] =
$servers[$server]['smtpport'];
+             }
          } else {
              foreach ($servers as $key => $curServer) {
                  if (!isset($server_key) && substr($key, 0, 1) != '_') {
***************
*** 1130,1135 ****
--- 1134,1142 ----
           if (!empty($_SESSION['imp']['smtphost'])) {
               $params['host'] = $_SESSION['imp']['smtphost'];
           }
+          if (!empty($_SESSION['imp']['smtpport'])) {
+              $params['port'] = $_SESSION['imp']['smtpport'];
+          }

          /*
           * If SMTP authentication has been requested, populate the
username and
*** servers.php.dist.orig       2004-12-01 10:43:17.000000000 +0100
--- servers.php.dist    2004-12-01 10:44:04.000000000 +0100
***************
*** 63,68 ****
--- 63,72 ----
   * IMP will use this host for outbound SMTP connections.  This value
   * overrides any existing $conf['mailer']['params']['host'] value at
runtime.
   *
+  * smtpport: If specified, and $conf['mailer']['type'] is set to 'smtp',
+  * IMP will use this port for outbound SMTP connections.  This value
+  * overrides any existing $conf['mailer']['params']['port'] value at
runtime.
+  *
   * realm: What to append to usernames for preferences and Horde
   * authentication to prevent login clashes on virtual host setups.
   *





More information about the bugs mailing list