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 Mailer extends APIEndpoint {
function send($data = []) {
try {
$mailer = new \MailPoet\Mailer\Mailer(
$mailer = new \MailPoet\Mailer\Mailer();
$mailer->init(
(isset($data['mailer'])) ? $data['mailer'] : false,
(isset($data['sender'])) ? $data['sender'] : false,
(isset($data['reply_to'])) ? $data['reply_to'] : false