explicitly deactivate TLS (and auto-tls) when setting use-tls is OFF; fixes #496
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
@@ -310,6 +310,8 @@ elseif ($page == 'testmail')
|
|||||||
$testmail->Password = Settings::Get('system.mail_smtp_passwd');
|
$testmail->Password = Settings::Get('system.mail_smtp_passwd');
|
||||||
if (Settings::Get('system.mail_smtp_usetls')) {
|
if (Settings::Get('system.mail_smtp_usetls')) {
|
||||||
$testmail->SMTPSecure = 'tls';
|
$testmail->SMTPSecure = 'tls';
|
||||||
|
} else {
|
||||||
|
$testmail->SMTPAutoTLS = false;
|
||||||
}
|
}
|
||||||
$testmail->Port = Settings::Get('system.mail_smtp_port');
|
$testmail->Port = Settings::Get('system.mail_smtp_port');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,6 +42,8 @@ function dieWithMail($message, $subject = "[froxlor] Cronjob error") {
|
|||||||
$_mail->Password = Settings::Get('system.mail_smtp_passwd');
|
$_mail->Password = Settings::Get('system.mail_smtp_passwd');
|
||||||
if (Settings::Get('system.mail_smtp_usetls')) {
|
if (Settings::Get('system.mail_smtp_usetls')) {
|
||||||
$_mail->SMTPSecure = 'tls';
|
$_mail->SMTPSecure = 'tls';
|
||||||
|
} else {
|
||||||
|
$mail->SMTPAutoTLS = false;
|
||||||
}
|
}
|
||||||
$_mail->Port = Settings::Get('system.mail_smtp_port');
|
$_mail->Port = Settings::Get('system.mail_smtp_port');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -564,6 +564,8 @@ if (Settings::Get('system.mail_use_smtp')) {
|
|||||||
$mail->Password = Settings::Get('system.mail_smtp_passwd');
|
$mail->Password = Settings::Get('system.mail_smtp_passwd');
|
||||||
if (Settings::Get('system.mail_smtp_usetls')) {
|
if (Settings::Get('system.mail_smtp_usetls')) {
|
||||||
$mail->SMTPSecure = 'tls';
|
$mail->SMTPSecure = 'tls';
|
||||||
|
} else {
|
||||||
|
$mail->SMTPAutoTLS = false;
|
||||||
}
|
}
|
||||||
$mail->Port = Settings::Get('system.mail_smtp_port');
|
$mail->Port = Settings::Get('system.mail_smtp_port');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,6 +34,8 @@ if (Settings::Get('system.mail_use_smtp')) {
|
|||||||
$mail->Password = Settings::Get('system.mail_smtp_passwd');
|
$mail->Password = Settings::Get('system.mail_smtp_passwd');
|
||||||
if (Settings::Get('system.mail_smtp_usetls')) {
|
if (Settings::Get('system.mail_smtp_usetls')) {
|
||||||
$mail->SMTPSecure = 'tls';
|
$mail->SMTPSecure = 'tls';
|
||||||
|
} else {
|
||||||
|
$mail->SMTPAutoTLS = false;
|
||||||
}
|
}
|
||||||
$mail->Port = Settings::Get('system.mail_smtp_port');
|
$mail->Port = Settings::Get('system.mail_smtp_port');
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user