Пример #1
0
         echo "send new email v3 set date <br>\n";
     } else {
         echo "\n else no send new email total sent is greater than 2 and value i" . $invited->getTotalEmailSent_();
     }
     $alert->alert("Date Time Send", $dateTime, " set = " . $dateTime . "  <br>\n");
     echo "set time zone = " . Time::getTimeZoneDateTime24();
     //send email
     //email version of sending
     if (Time::getTimeZoneDateTime24() >= $dateTime) {
         $alert->alert("\nAdd activity log", $invitedActivity->addActivityLog($qId, $action, $database), "set qId = {$qId} , action = {$action}");
         echo "\n send email to invited <br>\n";
         if (Email::sendInviteEmail3($admin->getAdminEmail_(), $invited->getEmail(), $email->inviteSubject1($invited->getTotalEmailSent_()), $qId, $invited->getTotalEmailSent_(), $invited->getFirstName())) {
             echo " email " . $invited->getEmail();
             echo "\n send email to admin";
             $newTotalSent = $invited->getTotalEmailSent_() + 1;
             $alert->alert("\nUpdate total send email ", $invited->updateTotalEmailSent($iId, $invited->getTotalEmailSent_() + 1, $database), "set iId = {$iId} and last total email sent  " . $invited->getTotalEmailSent_() . " new total email sent " . $newTotalSent);
         } else {
             echo "failed to send email<br>\n";
         }
     } else {
         echo "<br> \n " . __LINE__ . ". ) time zone = " . Time::getTimeZoneDateTime24() . "  < " . $dateTime;
         echo "<br>\n Email = " . $invited->getEmail();
     }
 } else {
     echo "\n email will not received an invite because the totasent email is greater than 2 but " . $invited->getTotalEmailSent_();
     echo "\n update queue status to 1";
     if ($invitedQueue->updateQueueStatus($qId, 1, $database) == TRUE) {
         echo "Email successfully update to queue.satatus = 1<br>";
     } else {
         echo "Email Failed update to queue.satatus = 1 <br>";
     }