Move logic for return path fallback address from method classes to factory

[MAILPOET-4115]
This commit is contained in:
Rostislav Wolny
2022-03-31 15:12:05 +02:00
committed by Veljko V
parent b8bfa60634
commit 36edab34e6
8 changed files with 14 additions and 51 deletions

View File

@@ -55,9 +55,7 @@ class SMTP implements MailerMethod {
$this->encryption = $encryption;
$this->sender = $sender;
$this->replyTo = $replyTo;
$this->returnPath = ($returnPath) ?
$returnPath :
$this->sender['from_email'];
$this->returnPath = $returnPath;
$this->mailer = $this->buildMailer();
$this->mailerLogger = new Swift_Plugins_Loggers_ArrayLogger();
$this->mailer->registerPlugin(new Swift_Plugins_LoggerPlugin($this->mailerLogger));