Inject WPFunctions to AmazonSES

[MAILPOET-4394]
This commit is contained in:
Sam Najian
2022-06-15 16:56:32 +02:00
committed by Veljko V
parent bcb7382760
commit b2e556fd90
2 changed files with 5 additions and 3 deletions

View File

@@ -57,7 +57,8 @@ class MailerFactory {
$sender,
$replyTo,
$returnPath,
new AmazonSESMapper()
new AmazonSESMapper(),
$this->wp
);
break;
case Mailer::METHOD_MAILPOET:

View File

@@ -73,7 +73,8 @@ class AmazonSES extends PHPMailerMethod {
$sender,
$replyTo,
$returnPath,
AmazonSESMapper $errorMapper
AmazonSESMapper $errorMapper,
WPFunctions $wp
) {
$this->awsAccessKey = $accessKey;
$this->awsSecretKey = $secretKey;
@@ -93,7 +94,7 @@ class AmazonSES extends PHPMailerMethod {
$this->date = gmdate('Ymd\THis\Z');
$this->dateWithoutTime = gmdate('Ymd');
$this->errorMapper = $errorMapper;
$this->wp = new WPFunctions();
$this->wp = $wp;
$this->blacklist = new BlacklistCheck();
$this->mailer = $this->buildMailer();
}