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->Username = $username;
|
||||
$mail->Password = $password;
|
||||
$mail->Port = $usePort;
|
||||
// encryption setting
|
||||
if ($useEncryption === 'ssl'){
|
||||
$mail->SMTPSecure = PHPMailer::ENCRYPTION_SMTPS;
|
||||
} elseif ($useEncryption === 'starttls'){
|
||||
$mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS;
|
||||
} elseif ($useEncryption === 'none'){
|
||||
$mail->SMTPSecure = false;
|
||||
$mail->SMTPAutoTLS = false;
|
||||
}
|
||||
$mail->Port = $usePort;
|
||||
|
||||
// recipients
|
||||
$mail->setFrom($replyTo);
|
||||
|
Loading…
Reference in New Issue
Block a user