Move Mailer error tests to unit [MAILPOET-2009]
This commit is contained in:
@ -4,6 +4,7 @@ namespace MailPoet\Mailer\Methods\ErrorMappers;
|
||||
use MailPoet\Mailer\MailerError;
|
||||
use MailPoet\Mailer\Mailer;
|
||||
use MailPoet\Mailer\SubscriberError;
|
||||
use MailPoet\WP\Functions as WPFunctions;
|
||||
|
||||
class AmazonSESMapper {
|
||||
use ConnectionErrorMapperTrait;
|
||||
@ -24,7 +25,7 @@ class AmazonSESMapper {
|
||||
function getErrorFromResponse($response, $subscriber) {
|
||||
$message = ($response) ?
|
||||
$response->Error->Message->__toString() :
|
||||
sprintf(__('%s has returned an unknown error.', 'mailpoet'), Mailer::METHOD_AMAZONSES);
|
||||
sprintf(WPFunctions::get()->__('%s has returned an unknown error.', 'mailpoet'), Mailer::METHOD_AMAZONSES);
|
||||
|
||||
$level = MailerError::LEVEL_HARD;
|
||||
if ($response && $response->Error->Code->__toString() === 'MessageRejected') {
|
||||
|
Reference in New Issue
Block a user