email/fax fixes for 4.2 branch (#2022)

I updated this to latest 4.2.
This commit is contained in:
jebsolutions
2016-10-31 16:21:26 -04:00
committed by FusionPBX
parent b887eb4c82
commit 0ed5657ec6
3 changed files with 39 additions and 0 deletions

View File

@@ -189,6 +189,22 @@
default: $mail->IsSMTP(); break;
}
} else $mail->IsSMTP();
// optional bypass TLS certificate check e.g. for self-signed certificates
if (isset($_SESSION['email']['smtp_validate_certificate'])) {
if ($_SESSION['email']['smtp_validate_certificate']['boolean'] == "false") {
// this is needed to work around TLS certificate problems
$mail->SMTPOptions = array(
'ssl' => array(
'verify_peer' => false,
'verify_peer_name' => false,
'allow_self_signed' => true
)
);
}
}
$mail->SMTPAuth = $smtp['auth'];
$mail->Host = $smtp['host'];
if ($smtp['port']!=0) $mail->Port=$smtp['port'];