1

This gets all users and stores them in an array For each of those users, generate email and SMS. There is also selection of the email template to be used. This only generates like 1000 emails and SMS, stops execution and returns a blank view with no error. What could be the problem?

     //Send invitations 
 $users_to_invite = $this->catalogue->fetch_users_to_invite();//1500 users
 foreach ($users_to_invite as $user_data) {
     // Select email template                       
     $email_template = SECURITY_AUCTION_INVITE;

     if ($catalogue_data[0]['payment_mode'] == 'D') {
         $email_template = DEDUCTIBLE_AUCTION_INVITE;
         if ($catalogue_data[0]['security_mode'] == SECURITY_MODE_BANK_DEPOSIT) {
             $email_template = DEDUCTIBLE_AUCTION_INVITE_BANK_DEPOSIT;
         }
     } 
     // Generate SMS
     $sms_msg = $this->communication_template->invitation_sms($catalogue_data, $user_data);
     // Generate email
     $this->username = $this->communication_template->invitation_mail($catalogue_data, $user_data);

     $this->replace_variable = array_merge($this->replace_variables,$this->username);
     // Generate SMS
     Commonfunction::send_text_message($user_data['msisdn'], $sms_msg);

     // Generate mail to user
     $mails = Commonfunction::get_email_template_details($email_template,$this->replace_variable,SEND_MAIL_TRUE);
}
Frank Inc
  • 31
  • 3

0 Answers0