Add basic interface for MailerMethod

[MAILPOET-4115]
This commit is contained in:
Rostislav Wolny
2022-03-24 14:53:17 +01:00
committed by Veljko V
parent eb07872d13
commit b10c30a7b1
7 changed files with 19 additions and 12 deletions

View File

@@ -8,7 +8,7 @@ use MailPoet\Mailer\Methods\ErrorMappers\AmazonSESMapper;
use MailPoet\WP\Functions as WPFunctions;
use MailPoetVendor\Swift_Message;
class AmazonSES {
class AmazonSES implements MailerMethod {
public $awsAccessKey;
public $awsSecretKey;
public $awsRegion;
@@ -93,7 +93,7 @@ class AmazonSES {
$this->blacklist = new BlacklistCheck();
}
public function send($newsletter, $subscriber, $extraParams = []) {
public function send($newsletter, $subscriber, $extraParams = []): array {
if ($this->blacklist->isBlacklisted($subscriber)) {
$error = $this->errorMapper->getBlacklistError($subscriber);
return Mailer::formatMailerErrorResult($error);