Changeset View
Changeset View
Standalone View
Standalone View
src/app/Jobs/PaymentMandateDisabledEmail.php
Show First 20 Lines • Show All 61 Lines • ▼ Show 20 Lines | public function handle() | ||||
if (empty($this->controller)) { | if (empty($this->controller)) { | ||||
return; | return; | ||||
} | } | ||||
$mail = new PaymentMandateDisabled($this->wallet, $this->controller); | $mail = new PaymentMandateDisabled($this->wallet, $this->controller); | ||||
list($to, $cc) = \App\Mail\Helper::userEmails($this->controller); | list($to, $cc) = \App\Mail\Helper::userEmails($this->controller); | ||||
if (!empty($to)) { | if (!empty($to) || !empty($cc)) { | ||||
$params = [ | $params = [ | ||||
'to' => $to, | 'to' => $to, | ||||
'cc' => $cc, | 'cc' => $cc, | ||||
'add' => " for {$this->wallet->id}", | 'add' => " for {$this->wallet->id}", | ||||
]; | ]; | ||||
\App\Mail\Helper::sendMail($mail, $this->controller->tenant_id, $params); | \App\Mail\Helper::sendMail($mail, $this->controller->tenant_id, $params); | ||||
} | } | ||||
Show All 11 Lines |