From baebfdd56cf0d557f5f9796e8ad764228dc3c4fa Mon Sep 17 00:00:00 2001 From: Daniel Nowottnick Date: Mon, 29 Jul 2024 15:17:33 +0200 Subject: [PATCH 1/3] abweichende Methodennamen angepasst --- lib/mailer_profile.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/mailer_profile.php b/lib/mailer_profile.php index 15167a5..049798a 100644 --- a/lib/mailer_profile.php +++ b/lib/mailer_profile.php @@ -41,7 +41,7 @@ public static function setProfile(rex_extension_point $ep): void /* Absendername */ /** @api */ - public function getFromname(): ?string + public function getFromName(): ?string { return $this->getValue('fromname'); } @@ -69,7 +69,7 @@ public function setFrom(mixed $value): self /* Lesebestätigung an */ /** @api */ - public function getConfirmto(): ?string + public function getConfirmReadingTo(): ?string { return $this->getValue('confirmto'); } @@ -139,7 +139,7 @@ public function setPort(float $value): self /* Verschlüsselung */ /** @api */ - public function getSecurityMode(): ?string + public function getSMTPAutoTLS(): ?string { return $this->getValue('security_mode'); } @@ -269,7 +269,7 @@ public function setPriority(mixed $value): self /* Debug */ /** @api */ - public function getSmtpDebug(): ?string + public function getSMTPDebug(): ?string { return $this->getValue('smtp_debug'); } From d8f0c23b98d713f7c04472f6baed6e6f399edf24 Mon Sep 17 00:00:00 2001 From: Alexander Walther Date: Mon, 19 Aug 2024 16:44:45 +0200 Subject: [PATCH 2/3] Update mailer_profile.php --- lib/mailer_profile.php | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/lib/mailer_profile.php b/lib/mailer_profile.php index 049798a..877be3f 100644 --- a/lib/mailer_profile.php +++ b/lib/mailer_profile.php @@ -5,7 +5,9 @@ class mailer_profile extends rex_yform_manager_dataset public static function setProfile(rex_extension_point $ep): void { $mailer = $ep->getSubject(); + /* @var rex_mailer $mailer */ $profile = rex_addon::get('mailer_profile')->getConfig('current'); + /* @var mailer_profile $profile */ if ($profile) { // $mailer->Timeout = $profile->getTimeout(); @@ -18,10 +20,10 @@ public static function setProfile(rex_extension_point $ep): void if ('smtp' == $profile->getMailer() && $mailer->Username = $profile->getUsername()) { $mailer->Host = $profile->getHost(); $mailer->Port = $profile->getPort(); - $mailer->SMTPDebug = $profile->getSMTPDebug(); - $mailer->SMTPSecure = $profile->getSMTPSecure(); - $mailer->SMTPAuth = $profile->getSMTPAuth(); - $mailer->SMTPAutoTLS = $profile->getSMTPAutoTLS(); + $mailer->SMTPDebug = $profile->getSmtpDebug(); + $mailer->SMTPSecure = $profile->getSmtpSecure(); + $mailer->SMTPAuth = $profile->getSmtpAuth(); + $mailer->SMTPAutoTLS = $profile->getSmtpAutoTls(); $mailer->Username = $profile->getUsername(); $mailer->Password = $profile->getPassword(); } @@ -139,7 +141,7 @@ public function setPort(float $value): self /* Verschlüsselung */ /** @api */ - public function getSMTPAutoTLS(): ?string + public function getSmtpAutoTls(): ?string { return $this->getValue('security_mode'); } @@ -171,13 +173,13 @@ public function setSmtpsecure(mixed $value): self /* Authentifizierung */ /** @api */ - public function getSmtpauth(): ?string + public function getSmtpAuth(): ?string { return $this->getValue('smtpauth'); } /** @api */ - public function setSmtpauth(mixed $value): self + public function setSmtpAuth(mixed $value): self { $this->setValue('smtpauth', $value); return $this; @@ -269,7 +271,7 @@ public function setPriority(mixed $value): self /* Debug */ /** @api */ - public function getSMTPDebug(): ?string + public function getSmtpDebug(): ?string { return $this->getValue('smtp_debug'); } From 4d639cafdd8039b8f0c4daf68fed3fec68aa93a8 Mon Sep 17 00:00:00 2001 From: Alexander Walther Date: Mon, 19 Aug 2024 16:46:13 +0200 Subject: [PATCH 3/3] Update mailer_profile.php --- lib/mailer_profile.php | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/lib/mailer_profile.php b/lib/mailer_profile.php index 877be3f..ca6d58f 100644 --- a/lib/mailer_profile.php +++ b/lib/mailer_profile.php @@ -49,7 +49,7 @@ public function getFromName(): ?string } /** @api */ - public function setFromname(mixed $value): self + public function setFromName(mixed $value): self { $this->setValue('fromname', $value); return $this; @@ -77,7 +77,7 @@ public function getConfirmReadingTo(): ?string } /** @api */ - public function setConfirmto(mixed $value): self + public function setConfirmReadingTo(mixed $value): self { $this->setValue('confirmto', $value); return $this; @@ -146,17 +146,18 @@ public function getSmtpAutoTls(): ?string return $this->getValue('security_mode'); } - public function getReturnto(): string + public function setSmtpAutoTls(mixed $value): self { - return $this->getValue('returnto'); + $this->setValue('security_mode', $value); + return $this; } - public function setSecurityMode(mixed $value): self + public function getReturnto(): string { - $this->setValue('security_mode', $value); - return $this; + return $this->getValue('returnto'); } + /* Verschlüsselungstyp */ /** @api */ public function getSmtpsecure(): ?string