Add blacklist to Mailer [MAILPOET-2176]

This commit is contained in:
wxa
2019-07-10 13:14:00 +03:00
committed by M. Shull
parent fc18280ebb
commit 57b13c8896
13 changed files with 125 additions and 0 deletions

View File

@@ -7,8 +7,11 @@ use MailPoet\Mailer\SubscriberError;
use MailPoet\WP\Functions as WPFunctions;
class PHPMailMapper {
use BlacklistErrorMapperTrait;
use ConnectionErrorMapperTrait;
const METHOD = Mailer::METHOD_PHPMAIL;
function getErrorFromException(\Exception $e, $subscriber) {
$level = MailerError::LEVEL_HARD;
if (strpos($e->getMessage(), 'Invalid address') === 0) {