Allow more advanced element focusing
[squirrelmail.git] / class / deliver / Deliver_SMTP.class.php
index 98eec1dd3bec6f4b916f70f6ae0f0ed035447cc7..fe64ec997996d93142ff02369b57f7c873c51b35 100644 (file)
@@ -5,7 +5,7 @@
  *
  * SMTP delivery backend for the Deliver class.
  *
- * @copyright 1999-2014 The SquirrelMail Project Team
+ * @copyright 1999-2018 The SquirrelMail Project Team
  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  * @version $Id$
  * @package squirrelmail
@@ -154,6 +154,9 @@ class Deliver_SMTP extends Deliver {
         if (preg_match('/^\d+\.\d+\.\d+\.\d+$/', $helohost))
             $helohost = '[' . $helohost . ']';
 
+        $hook_result = do_hook('smtp_helo_override', $helohost);
+        if (!empty($hook_result)) $helohost = $hook_result;
+
         /* Lets introduce ourselves */
         fputs($stream, "EHLO $helohost\r\n");
         // Read ehlo response