mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 11:43:50 +00:00
@@ -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'];
|
||||
|
||||
Reference in New Issue
Block a user