Skip to content

Commit

Permalink
Merge pull request #12 from maxsmily/main
Browse files Browse the repository at this point in the history
abweichende Methodennamen angepasst
  • Loading branch information
alxndr-w authored Aug 19, 2024
2 parents aaa6911 + 4d639ca commit e8b2d90
Showing 1 changed file with 19 additions and 16 deletions.
35 changes: 19 additions & 16 deletions lib/mailer_profile.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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();
}
Expand All @@ -41,13 +43,13 @@ public static function setProfile(rex_extension_point $ep): void

/* Absendername */
/** @api */
public function getFromname(): ?string
public function getFromName(): ?string
{
return $this->getValue('fromname');
}

/** @api */
public function setFromname(mixed $value): self
public function setFromName(mixed $value): self
{
$this->setValue('fromname', $value);
return $this;
Expand All @@ -69,13 +71,13 @@ public function setFrom(mixed $value): self

/* Lesebestätigung an */
/** @api */
public function getConfirmto(): ?string
public function getConfirmReadingTo(): ?string
{
return $this->getValue('confirmto');
}

/** @api */
public function setConfirmto(mixed $value): self
public function setConfirmReadingTo(mixed $value): self
{
$this->setValue('confirmto', $value);
return $this;
Expand Down Expand Up @@ -139,22 +141,23 @@ public function setPort(float $value): self

/* Verschlüsselung */
/** @api */
public function getSecurityMode(): ?string
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
Expand All @@ -171,13 +174,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;
Expand Down

0 comments on commit e8b2d90

Please sign in to comment.