We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent deaa468 commit 7e46ddaCopy full SHA for 7e46dda
1 file changed
components/ILIAS/Mail/classes/Mime/Transport/class.ilMailMimeTransportSmtp.php
@@ -32,6 +32,16 @@ protected function onBeforeSend(): void
32
$this->mailer->Password = $this->settings->get('mail_smtp_password', '');
33
}
34
$this->mailer->SMTPSecure = $this->settings->get('mail_smtp_encryption', '');
35
- $this->mailer->SMTPDebug = 4;
+ $this->mailer->SMTPDebug = PHPMailer\PHPMailer\SMTP::DEBUG_LOWLEVEL;
36
+ $this->mailer->SMTPKeepAlive = true;
37
+ }
38
+
39
+ public function __destruct()
40
+ {
41
+ try {
42
+ $this->mailer->SMTPDebug = PHPMailer\PHPMailer\SMTP::DEBUG_OFF;
43
+ $this->mailer->smtpClose();
44
+ } catch (Throwable) {
45
46
47
0 commit comments