예제 #1
0
 function logEmeilSend($mail)
 {
     $currentUser = $this->userLoginApp->getCurrentUser();
     $log = new Email_log();
     $log->setTo($mail->getTo());
     $log->setSubject($mail->getSubject());
     $log->setText($mail->getText());
     $log->setR_user($currentUser->getId());
     $timeZone = new DateTimeZone("Europe/Vilnius");
     $time = new DateTime("now", $timeZone);
     $log->setR_date($time->format("Y-m-d H:i:s"));
     $isSuccess = false;
     $rez = $this->emailLogDao->insert($log, true);
     if (is_numeric($rez)) {
         $isSuccess = $rez >= 1;
     }
 }
예제 #2
0
 function logEmeilSend($mail)
 {
     $log = new Email_log();
     $log->setTo($mail->getTo());
     $log->setSubject($mail->getSubject());
     $log->setText($mail->getText());
     $log->setR_user("INFORM_JOB");
     $timeZone = new DateTimeZone("Europe/Vilnius");
     $time = new DateTime("now", $timeZone);
     $log->setR_date($time->format("Y-m-d H:i:s"));
     $isSuccess = false;
     $rez = $this->emailLogDao->insert($log, true);
     if (is_numeric($rez)) {
         $isSuccess = $rez >= 1;
     }
     if (!$isSuccess) {
         $this->sendErrorMail("Nepavyko issaugoti emeilo logo");
     }
 }
예제 #3
0
 function find($criteria = null, $order = null, $limit = 1000, $from = 0)
 {
     $result = $this->database->query($this->buildFindQuery($criteria, $order, $limit, $from));
     if (!is_null($result->getError())) {
         return $result->getError();
     }
     $email_logs = array();
     while ($row = $result->fetchRow()) {
         $email_log = new Email_log();
         $value = $row[0];
         $email_log->setId($value);
         $value = $row[1];
         $email_log->setTo($value);
         $value = $row[2];
         $email_log->setSubject($value);
         $value = $row[3];
         $email_log->setText($value);
         $value = $row[4];
         $email_log->setR_date($value);
         $value = $row[5];
         $email_log->setR_user($value);
         if ($order != null) {
             array_push($email_logs, $email_log);
         } else {
             $email_logs[$email_log->getId()] = $email_log;
         }
     }
     return $email_logs;
 }