From c10f3e31e877ecbfcdaa321a84069b250631f4d5 Mon Sep 17 00:00:00 2001 From: Simon L Date: Fri, 23 Jun 2023 11:07:41 +0200 Subject: [PATCH] use getsystemvalue-functions in Mailer.php Signed-off-by: Simon L --- lib/private/Mail/Mailer.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/private/Mail/Mailer.php b/lib/private/Mail/Mailer.php index 05ef0bf5139..148a4f6f833 100644 --- a/lib/private/Mail/Mailer.php +++ b/lib/private/Mail/Mailer.php @@ -293,8 +293,8 @@ class Mailer implements IMailer { // either null or true - if nothing is passed, let the symfony mailer figure out the configuration by itself $mailSmtpsecure = ($this->config->getSystemValue('mail_smtpsecure', null) === 'ssl') ? true : null; $transport = new EsmtpTransport( - $this->config->getSystemValue('mail_smtphost', '127.0.0.1'), - (int)$this->config->getSystemValue('mail_smtpport', 25), + $this->config->getSystemValueString('mail_smtphost', '127.0.0.1'), + $this->config->getSystemValueInt('mail_smtpport', 25), $mailSmtpsecure, null, $this->logger @@ -302,11 +302,11 @@ class Mailer implements IMailer { /** @var SocketStream $stream */ $stream = $transport->getStream(); /** @psalm-suppress InternalMethod */ - $stream->setTimeout($this->config->getSystemValue('mail_smtptimeout', 10)); + $stream->setTimeout($this->config->getSystemValueInt('mail_smtptimeout', 10)); - if ($this->config->getSystemValue('mail_smtpauth', false)) { - $transport->setUsername($this->config->getSystemValue('mail_smtpname', '')); - $transport->setPassword($this->config->getSystemValue('mail_smtppassword', '')); + if ($this->config->getSystemValueBool('mail_smtpauth', false)) { + $transport->setUsername($this->config->getSystemValueString('mail_smtpname', '')); + $transport->setPassword($this->config->getSystemValueString('mail_smtppassword', '')); } $streamingOptions = $this->config->getSystemValue('mail_smtpstreamoptions', []);