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'] != '') {