MAIL SEND BASED ON ENV AND TWO HARD CODED

This commit is contained in:
Velz2020 2019-10-05 17:15:57 +05:30
parent 7cb5691db8
commit 76c2b830b8

View File

@ -17,6 +17,8 @@ class PDALERTS
public static function pdnotification($pdid) public static function pdnotification($pdid)
{ {
if($pdid != "" || $pdid != null) if($pdid != "" || $pdid != null)
{ {
//echo $pdid; //echo $pdid;
@ -168,9 +170,14 @@ class PDALERTS
// self::sendMail($CI,$lender_email,$msg,$core_details); // currently Mail disabled // self::sendMail($CI,$lender_email,$msg,$core_details); // currently Mail disabled
} }
if(ENVIRONMENT == 'production')
{
if($lender_sales_person_email != null){ self::sendMail($CI,$lender_sales_person_email,$msg,$core_details); } if($lender_sales_person_email != null){ self::sendMail($CI,$lender_sales_person_email,$msg,$core_details); }
if($lender_credit_person_email != null){ self::sendMail($CI,$lender_credit_person_email,$msg,$core_details); } if($lender_credit_person_email != null){ self::sendMail($CI,$lender_credit_person_email,$msg,$core_details); }
if($financial_institude_email != null){ self::sendMail($CI,$financial_institude_email,$msg,$core_details); }// currently Mail disabled if($financial_institude_email != null){ self::sendMail($CI,$financial_institude_email,$msg,$core_details); }
}
self::sendMail($CI,'komalmittal@sinemanagement.com',$msg,$core_details);
self::sendMail($CI,'sinepd@sinemanagement.com',$msg,$core_details);
} }
// echo 'afer len mail'; // echo 'afer len mail';
@ -436,8 +443,9 @@ class PDALERTS
$mail->Password = "noreply@ssa"; // "The password" $mail->Password = "noreply@ssa"; // "The password"
$mail->Port = 465; // "The port" $mail->Port = 465; // "The port"
$mail->addAddress($lender_email); // Name is optional $mail->addAddress($lender_email); // Name is optional
$mail->From = 'noreply@ssa.sineedge.com'; $mail->From = 'noreply@pdgenie.com';
$mail->FromName = 'SineEdge QC Team'; $fromName = 'SineEdge QC Team'; if(ENVIRONMENT == 'testing' || ENVIRONMENT == 'development') { $fromName .= ' ( TEST ENV ) '; }
$mail->FromName = $fromName;
$mail->isHTML(true); // Set email format to HTML $mail->isHTML(true); // Set email format to HTML
$mail->Subject = 'PD Report For Application ID -'.$core_details[0]['lender_applicant_id']; $mail->Subject = 'PD Report For Application ID -'.$core_details[0]['lender_applicant_id'];
$mail->Body = $msg; $mail->Body = $msg;