Send email when SendReminders finishes
This commit is contained in:
parent
6371339805
commit
2cdf369c04
1 changed files with 9 additions and 1 deletions
|
|
@ -32,7 +32,7 @@ class SendReminders extends Command
|
|||
* @var InvoiceRepository
|
||||
*/
|
||||
protected $invoiceRepo;
|
||||
|
||||
|
||||
/**
|
||||
* @var accountRepository
|
||||
*/
|
||||
|
|
@ -80,6 +80,14 @@ class SendReminders extends Command
|
|||
}
|
||||
|
||||
$this->info('Done');
|
||||
|
||||
if ($errorEmail = env('ERROR_EMAIL')) {
|
||||
\Mail::raw('EOM', function ($message) use ($errorEmail) {
|
||||
$message->to($errorEmail)
|
||||
->from(CONTACT_EMAIL)
|
||||
->subject('SendReminders: Finished successfully');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue