diff --git a/app/Controllers/LeadsController.php b/app/Controllers/LeadsController.php index 3d82fced..731202da 100644 --- a/app/Controllers/LeadsController.php +++ b/app/Controllers/LeadsController.php @@ -1089,6 +1089,7 @@ class LeadsController extends BaseController // 7. Define mail templates as constants or config $mail_content = $this->getMailTemplate(); + $placement_mail_content = $this->getMailTemplate('placement'); $subject = $this->getSubjectTemplate($lead_data); // 8. Pre-calculate sum assured only for GPA @@ -1097,7 +1098,7 @@ class LeadsController extends BaseController // 9. Transform mail content once $data['mail_content'] = $this->transformMailContent($lead_data, $mail_content, $data['page_name']); $data['subject'] = $this->transformMailContent($lead_data, $subject, $data['page_name']); - $data['placement_mail_content'] = $this->transformMailContent($lead_data, $mail_content, 'Placement'); + $data['placement_mail_content'] = $this->transformMailContent($lead_data, $placement_mail_content, 'Placement'); $data['placement_subject'] = $this->transformMailContent($lead_data, $subject, 'Placement'); // 10. Combine related queries @@ -1150,24 +1151,43 @@ class LeadsController extends BaseController } // 13. Extract mail template to separate method for reusability - private function getMailTemplate() - { - return ' -
Dear Sir,
-Greetings From Nhance India!
-Please find attached the {{RFQ_OR_QCR}} for {{POLICY_TYPE}} policy pertaining to {{CLIENT_NAME}}.
-Kindly request you to share the competitive quotes at the earliest.
-In case of any query, please feel free to contact us.
-Thank You!
Best regards,
+ private function getMailTemplate( $template_type = "" ) + { + if($template_type == 'placement'){ + return ' +Dear Sir,
+Greetings From Nhance India!
+Please find attached the {{RFQ_OR_QCR}} for {{POLICY_TYPE}} policy pertaining to {{CLIENT_NAME}}.
+Kindly request you to issue the policy at the earliest.
+In case of any query, please feel free to contact us.
+Thank You!
Best regards,
+ +Dear Sir,
+Greetings From Nhance India!
+Please find attached the {{RFQ_OR_QCR}} for {{POLICY_TYPE}} policy pertaining to {{CLIENT_NAME}}.
+Kindly request you to share the competitive quotes at the earliest.
+In case of any query, please feel free to contact us.
+Thank You!
Best regards,
+ +