disable opportunistic TLS
This commit is contained in:
parent
e97da63d0b
commit
8ca417d808
@ -29,13 +29,16 @@ function sendEmail($timeout, $hostname, $usePort, $useEncryption, $username, $pa
|
|||||||
$mail->SMTPAuth = true;
|
$mail->SMTPAuth = true;
|
||||||
$mail->Username = $username;
|
$mail->Username = $username;
|
||||||
$mail->Password = $password;
|
$mail->Password = $password;
|
||||||
|
$mail->Port = $usePort;
|
||||||
// encryption setting
|
// encryption setting
|
||||||
if ($useEncryption === 'ssl'){
|
if ($useEncryption === 'ssl'){
|
||||||
$mail->SMTPSecure = PHPMailer::ENCRYPTION_SMTPS;
|
$mail->SMTPSecure = PHPMailer::ENCRYPTION_SMTPS;
|
||||||
} elseif ($useEncryption === 'starttls'){
|
} elseif ($useEncryption === 'starttls'){
|
||||||
$mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS;
|
$mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS;
|
||||||
|
} elseif ($useEncryption === 'none'){
|
||||||
|
$mail->SMTPSecure = false;
|
||||||
|
$mail->SMTPAutoTLS = false;
|
||||||
}
|
}
|
||||||
$mail->Port = $usePort;
|
|
||||||
|
|
||||||
// recipients
|
// recipients
|
||||||
$mail->setFrom($replyTo);
|
$mail->setFrom($replyTo);
|
||||||
|
Loading…
Reference in New Issue
Block a user