Add soft level errors distinction for PHPMail method

[MAILPOET-1154]
This commit is contained in:
Rostislav Wolny
2018-09-11 14:55:39 +02:00
parent 45433c9deb
commit fe69b56692
3 changed files with 45 additions and 3 deletions

View File

@@ -33,7 +33,7 @@ class PHPMail {
$mailer = $this->configureMailerWithMessage($newsletter, $subscriber, $extra_params);
$result = $mailer->send();
} catch(\Exception $e) {
return Mailer::formatMailerErrorResult($this->error_mapper->getErrorFromException($e));
return Mailer::formatMailerErrorResult($this->error_mapper->getErrorFromException($e, $subscriber, $extra_params));
}
if($result === true) {
return Mailer::formatMailerSendSuccessResult();