From f0594c8279655ea46103880710dfdee3ea4df791 Mon Sep 17 00:00:00 2001 From: Nate Date: Wed, 28 Nov 2018 23:00:12 -0700 Subject: [PATCH] Update v_mailto.php Add ability to define the hostname used when sending mail. --- secure/v_mailto.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/secure/v_mailto.php b/secure/v_mailto.php index f493aac8d2..a759c486e4 100755 --- a/secure/v_mailto.php +++ b/secure/v_mailto.php @@ -135,6 +135,9 @@ //prepare smtp server settings // load default smtp settings + if ($_SESSION['email']['smtp_hostname']['text'] != '') { + $smtp['hostname'] = $_SESSION['email']['smtp_hostname']['text']; + } $smtp['host'] = (strlen($_SESSION['email']['smtp_host']['text'])?$_SESSION['email']['smtp_host']['text']:'127.0.0.1'); if (isset($_SESSION['email']['smtp_port'])) { $smtp['port'] = (int)$_SESSION['email']['smtp_port']['numeric']; @@ -210,6 +213,9 @@ } $mail->SMTPAuth = $smtp['auth']; + if (isset($smtp['hostname'])) { + $mail->Hostname = $smtp['hostname']; + } $mail->Host = $smtp['host']; if ($smtp['port']!=0) $mail->Port=$smtp['port']; if ($smtp['secure'] != '') {