after a series of bug fixes plus Non MNO logic for Sender IDs, unfinished leave management and holiday modules
This commit is contained in:
@@ -42,7 +42,7 @@ class NewMnoNotesEmailAlerts implements ShouldQueue
|
||||
];
|
||||
\Log::info($note->notes_body);
|
||||
$mailer->send('emails.new-mno-notes', $data, function ($message) use ($data, $emails) {
|
||||
$message->from('support@click-mobile.com', 'Click Mobile ERP');
|
||||
$message->from('alerts@click-mobile.com', 'Click Mobile ERP');
|
||||
$message->to($emails)->subject('New Notes on Mobile Operators');
|
||||
});
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ class SendClientContractRenewalAlert implements ShouldQueue
|
||||
];
|
||||
|
||||
$mailer->send('emails.client_renewal-alert', $data, function ($message) use ($data, $emails) {
|
||||
$message->from('support@click-mobile.com', 'Click Mobile ERP');
|
||||
$message->from('alerts@click-mobile.com', 'Click Mobile ERP');
|
||||
$message->to($emails)->subject('Client Contract Renewal Alert');
|
||||
});
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ class SendMnoContractRenewalEmailAlert implements ShouldQueue
|
||||
'alert_body' => 'Contract for ' . $renewalSet['mno_name'] . ' will expire in ' . $renewalSet['days_to_expire'] . ' days. Take note'
|
||||
];
|
||||
$mailer->send('emails.renewal-alert', $data, function ($message) use ($data, $emails) {
|
||||
$message->from('support@click-mobile.com', 'Click Mobile ERP');
|
||||
$message->from('alerts@click-mobile.com', 'Click Mobile ERP');
|
||||
$message->to($emails)->subject('Contract Renewal Alert');
|
||||
});
|
||||
}
|
||||
|
||||
@@ -31,11 +31,8 @@ class SendNewNotesEmailAlert implements ShouldQueue
|
||||
public function handle(Mailer $mailer)
|
||||
{
|
||||
$note = $this->note;
|
||||
$emails = ['samuel@click-mobile.com'];
|
||||
|
||||
$emails = ['samuel@click-mobile.com', 'kwesi@click-mobile.com', 'mansa@click-mobile.com'];
|
||||
//$note_body = $note->notes_body;
|
||||
|
||||
|
||||
$data = [
|
||||
'client' => $note->client_info->name,
|
||||
'created_by' => $note->created_by_info->name,
|
||||
@@ -46,8 +43,9 @@ class SendNewNotesEmailAlert implements ShouldQueue
|
||||
\Log::info("New notes for : " . $note->client_info->name);
|
||||
\Log::info("New notes triggered by : " . $note->created_by_info->name);
|
||||
\Log::info($note->notes_body);
|
||||
|
||||
$mailer->send('emails.new-notes', $data, function ($message) use ($data, $emails) {
|
||||
$message->from('support@click-mobile.com', 'Click Mobile ERP');
|
||||
$message->from('alerts@click-mobile.com', 'Click Mobile ERP');
|
||||
$message->to($emails)->subject('New Notes');
|
||||
});
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ class SendNewUssdClientEmail implements ShouldQueue
|
||||
'status' => $status
|
||||
];
|
||||
$mailer->send('emails.new_ussd_client', $data, function ($message) use ($data, $emails) {
|
||||
$message->from('support@click-mobile.com', 'Click Mobile Account Manager Tracker');
|
||||
$message->from('alerts@click-mobile.com', 'Click Mobile ERP');
|
||||
$message->to($emails)->subject('New USSD Client Details');
|
||||
});
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ class SendOnboardingCompletedEmailAlert implements ShouldQueue
|
||||
'how_we_got' => $client->how_we_got_client
|
||||
];
|
||||
$mailer->send('emails.onboarding_completed', $data, function ($message) use ($data, $emails) {
|
||||
$message->from('support@click-mobile.com', 'Click Mobile ERP');
|
||||
$message->from('alerts@click-mobile.com', 'Click Mobile ERP');
|
||||
$message->to($emails)->subject('Onboarding Completed');
|
||||
});
|
||||
}
|
||||
|
||||
59
app/Jobs/SendShortCodeListToFinance.php
Normal file
59
app/Jobs/SendShortCodeListToFinance.php
Normal file
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
|
||||
namespace App\Jobs;
|
||||
|
||||
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 SendShortCodeListToFinance implements ShouldQueue
|
||||
{
|
||||
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
||||
protected $short_code_list;
|
||||
protected $message_body;
|
||||
protected $finance_arr;
|
||||
/**
|
||||
* Create a new job instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct($short_code_list, $message_body, $finance_arr)
|
||||
{
|
||||
$this->short_code_list = $short_code_list;
|
||||
$this->message_body = $message_body;
|
||||
$this->finance_arr = $finance_arr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute the job.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function handle(Mailer $mailer)
|
||||
{
|
||||
$short_code_list = $this->short_code_list;
|
||||
$message_body = $this->message_body;
|
||||
$finance_arr = $this->finance_arr;
|
||||
|
||||
$emails = [
|
||||
'samuel@click-mobile.com',
|
||||
'kwesi@click-mobile.com',
|
||||
'daniel@click-mobile.com',
|
||||
'jim@click-mobile.com',
|
||||
'priscilla@click-mobile.com',
|
||||
'mansa@click-mobile.com'
|
||||
];
|
||||
$data = [
|
||||
'short_code_list' => $short_code_list,
|
||||
'message_body' => $message_body,
|
||||
'finance_arr' => $finance_arr
|
||||
];
|
||||
$mailer->send('emails.short_code_payment_alert', $data, function ($message) use ($data, $emails) {
|
||||
$message->from('alerts@click-mobile.com', 'Click Mobile ERP');
|
||||
$message->to($emails)->subject('Short Code Invoices');
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -45,7 +45,7 @@ class SendSupportFeesReminderEmailAlert implements ShouldQueue
|
||||
'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->from('alerts@click-mobile.com', 'Click Mobile ERP');
|
||||
$message->to($emails)->subject('Support Fees Reminder');
|
||||
});
|
||||
}
|
||||
|
||||
44
app/Jobs/SendTestEmail.php
Normal file
44
app/Jobs/SendTestEmail.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
namespace App\Jobs;
|
||||
|
||||
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 SendTestEmail implements ShouldQueue
|
||||
{
|
||||
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
||||
|
||||
/**
|
||||
* Create a new job instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute the job.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function handle(Mailer $mailer)
|
||||
{
|
||||
$emails = [
|
||||
'kwesi@click-mobile.com',
|
||||
'kwesi_banson@hotmail.com',
|
||||
'mansa@click-mobile.com'
|
||||
];
|
||||
$data = [];
|
||||
$mailer->send('emails.test', $data, function ($message) use ($data, $emails) {
|
||||
$message->from('alerts@click-mobile.com', 'Click Mobile ERP');
|
||||
$message->to($emails)->subject('Short Code Invoices');
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -41,7 +41,7 @@ class SendUssdClientActiveEmail implements ShouldQueue
|
||||
'status' => $status
|
||||
];
|
||||
$mailer->send('emails.active_ussd_client', $data, function ($message) use ($data, $emails) {
|
||||
$message->from('support@click-mobile.com', 'Click Mobile Account Manager Tracker');
|
||||
$message->from('alerts@click-mobile.com', 'Click Mobile ERP');
|
||||
$message->to($emails)->subject('New USSD Client Details');
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user