Policy Name : ';
$temp_data ='';
+ $policy_name ='';
+ $is_addon ='';
foreach ($item as $inner_item) {
$policy_name = $inner_item['policy_name'];
$temp_data .= '| ' . $inner_item['name'] . ' | '.$inner_item['mobile'].' | ₹'.number_format($inner_item['basic_cover_si'], 2, '.', ',').' | '.\DateTime::createFromFormat('Y-m-d', $inner_item['dob'])->format('d-m-Y').' |
';
@@ -293,6 +303,8 @@ class sendMailNotification
$temp_data = '';
$addtional_premium = 0;
$gst = 0;
+ }
+
}
@@ -308,14 +320,17 @@ class sendMailNotification
$mail_content = str_replace("[[member_summary]]", $table_content , $mail_content);
$account_manager_mail_list = [];
- foreach ($user_list as $key => $value) {
- $full_name = $value['first_name'] .' ' .$value['last_name'];
- $mail_content = str_replace("[[member_name]]", $full_name , $mail_content);
+ // print_r($user_list);die;
+ if(isset($user_list)){
+ foreach ($user_list as $key => $value) {
+ $full_name = $value['first_name'] .' ' .$value['last_name'];
+ $mail_content = str_replace("[[member_name]]", $full_name , $mail_content);
- $wholeData[] = ['mail' => $value['email'], 'subject' => $subject,'message'=> $mail_content];
- // $wholeData[] = ['mail' => $value['email'], 'subject' => $subject,'message'=> $mail_content, 'bcc'=> $client_data['common_mails']];
+ $wholeData[] = ['mail' => $value['email'], 'subject' => $subject,'message'=> $mail_content];
+ // $wholeData[] = ['mail' => $value['email'], 'subject' => $subject,'message'=> $mail_content, 'bcc'=> $client_data['common_mails']];
+ }
+ return $wholeData;
}
- return $wholeData;
}
} else if($action == 'client_hr_summary_mail'){
@@ -413,7 +428,7 @@ class sendMailNotification
$hr_mails = $client_data['hr_mails'];
$mail_array = explode(',', $hr_mails);
$mail_array = array_map('trim', $mail_array);
-
+ $wholeData = [];
foreach ($mail_array as $key => $value) {
$wholeData[] = ['mail' => $value, 'subject' => $subject,'message'=> $mail_content];
// $wholeData[] = ['mail' => $value, 'subject' => $subject,'message'=> $mail_content, 'bcc'=> $client_data['common_mails']];