Update v_mailto.php
Add ability to define the hostname used when sending mail.
This commit is contained in:
parent
62f392aed3
commit
f0594c8279
|
|
@ -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'] != '') {
|
||||
|
|
|
|||
Loading…
Reference in New Issue