Move mailer configuration to init method

[MAILPOET-2146]
This commit is contained in:
Pavel Dohnal
2019-07-24 10:40:00 +02:00
committed by M. Shull
parent d6f263ef3f
commit 8739646a6a
7 changed files with 40 additions and 23 deletions

View File

@ -36,7 +36,8 @@ class SendingQueue extends APIEndpoint {
// check that the sending method has been configured properly
try {
new \MailPoet\Mailer\Mailer(false);
$mailer = new \MailPoet\Mailer\Mailer();
$mailer->init();
} catch (\Exception $e) {
return $this->errorResponse([
$e->getCode() => $e->getMessage(),