CHANGE_MAIL_APPROVE_3 : AADHAVAN

This commit is contained in:
aadhavan valli 2024-07-10 12:04:50 +05:30
parent c46b7153c8
commit d7bbcb562a

View File

@ -783,7 +783,7 @@ class MasterController extends BaseController
public function rememeber_notification() public function rememeber_notification()
{ {
// try { try {
$doc_id = $this->request->getPost('doc_id'); $doc_id = $this->request->getPost('doc_id');
$MailHelper = new MailHelper(); $MailHelper = new MailHelper();
@ -802,9 +802,16 @@ class MasterController extends BaseController
$businessData = $this->BusinessModel->select('business.*') $businessData = $this->BusinessModel->select('business.*')
->where('business.business_id',$this->session->get('logged_in_staff_business_id')) ->where('business.business_id',$this->session->get('logged_in_staff_business_id'))
->get()->getRow(); ->get()->getRow();
echo $clientData->email;
echo $businessData->business_name;
echo $url;
$subject = 'BB-Sign Verify Document'; $subject = 'BB-Sign Verify Document';
$message = "Dear " . $clientData->client_name . ",<br>" . $businessData->business_name . " has requested your approval for a document. Please click the link below to preview and approve.<br><br>" . $url; $message = "Dear " . $clientData->client_name . ",<br>" . $businessData->business_name . " has requested your approval for a document. Please click the link below to preview and approve.<br><br>" . $url;
$MailHelper->send_url_email($clientData->email , '', $subject, $message); $mail_send = $MailHelper->send_url_email('' , '', $subject, $message);
if (!$mail_send) {
throw new \Exception('Email sending failed.');
}
print_r($mail_send);
$notificationHelper = new NotificationHelper(); $notificationHelper = new NotificationHelper();
$number = '91'.$clientData->mobile_no; // Replace with dynamic recipient number $number = '91'.$clientData->mobile_no; // Replace with dynamic recipient number
if($clientData->whatsapp == 1){ if($clientData->whatsapp == 1){
@ -812,9 +819,9 @@ class MasterController extends BaseController
//$notificationHelper->sendWhatsAppMessage($number, $whatsApp_message, $url); //$notificationHelper->sendWhatsAppMessage($number, $whatsApp_message, $url);
} }
return $this->respond(['success' => true, 'data' => 'Remember Send Successfully']); return $this->respond(['success' => true, 'data' => 'Remember Send Successfully']);
// } catch (\Exception $exception) { } catch (\Exception $exception) {
// return $this->response->setJSON(['status' => 'failed','code' => 500,'data' => $exception],500); return $this->response->setJSON(['status' => 'failed','code' => 500,'data' => $exception],500);
// } }
} }
public function doc_generate_otp() public function doc_generate_otp()