added sender ID to the clients Tab in Show view plus bug fixes
This commit is contained in:
52
app/Jobs/SendSupportFeesReminderEmailAlert.php
Normal file
52
app/Jobs/SendSupportFeesReminderEmailAlert.php
Normal file
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
|
||||
namespace App\Jobs;
|
||||
use App\Models;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
use Illuminate\Queue\InteractsWithQueue;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Foundation\Bus\Dispatchable;
|
||||
use Illuminate\Contracts\Mail\Mailer;
|
||||
|
||||
class SendSupportFeesReminderEmailAlert implements ShouldQueue
|
||||
{
|
||||
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
||||
protected $renewalSet;
|
||||
/**
|
||||
* Create a new job instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
public function __construct($renewalSet)
|
||||
{
|
||||
$this->renewalSet = $renewalSet;
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute the job.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
public function handle(Mailer $mailer){
|
||||
$renewalSet = $this->renewalSet;
|
||||
$emails = ['samuel@click-mobile.com'];
|
||||
$emails = ['kwesi@click-mobile.com'];
|
||||
$emails = ['effie@click-mobile.com'];
|
||||
$emails = ['priscilla@click-mobile.com'];
|
||||
$emails = ['jim@click-mobile.com'];
|
||||
$emails = ['daniel@click-mobile.com'];
|
||||
$emails = ['mansa@click-mobile.com'];
|
||||
$emails[] = $renewalSet['account_manager_email'];
|
||||
$data = [
|
||||
'client_name' => $renewalSet['client_name'],
|
||||
'alert_body' => 'Support fees for ' . $renewalSet['client_name'] . ' will be due in ' . $renewalSet['days_to_renew'] . ' days. Take note'
|
||||
];
|
||||
$mailer->send('emails.supportfees-alert', $data, function ($message) use ($data, $emails) {
|
||||
$message->from('support@click-mobile.com', 'Click Mobile ERP');
|
||||
$message->to($emails)->subject('Support Fees Reminder');
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user