Pause sending of spammer users [MAILPOET-1649]

This commit is contained in:
Amine Ben hammou
2018-11-28 17:33:26 +01:00
parent ddaf9e361d
commit 160d4ae3ec
4 changed files with 32 additions and 1 deletions

View File

@ -5,6 +5,7 @@ use MailPoet\Mailer\MailerError;
use MailPoet\Mailer\SubscriberError;
use MailPoet\Services\Bridge\API;
use InvalidArgumentException;
use MailPoet\Util\Helpers;
if(!defined('ABSPATH')) exit;
@ -49,6 +50,13 @@ class MailPoetMapper {
$message = __('Email service is temporarily not available, please try again in a few minutes.', 'mailpoet');
$retry_interval = self::TEMPORARY_UNAVAILABLE_RETRY_INTERVAL;
break;
case API::RESPONSE_CODE_BANNED_ACCOUNT:
$message = Helpers::replaceLinkTags(
__('You currently are not permitted to send any emails with MailPoet Sending Service, which may have happened due to poor deliverability. Please [link]contact our support team[/link] to resolve the issue.', 'mailpoet'),
'https://www.mailpoet.com/support/',
array('target' => '_blank')
);
break;
case API::RESPONSE_CODE_KEY_INVALID:
case API::RESPONSE_CODE_PAYLOAD_TOO_BIG:
default: