Exemplo n.º 1
0
 private function saveLogs()
 {
     $line = str_repeat('--------', 8);
     $this->addLog("\n\n" . $line);
     $this->addLog(date("Y-m-d H:i:s"));
     $this->addLog("Email Sent: " . ($this->isSent ? 'OK' : 'Failed (' . $this->sendError . ')'));
     $this->addLog($this->sentMIMEMessage);
     $this->addLog($line . "\n\n");
     $logFile = Form::getEmailLogFile();
     Form::secureFile($logFile);
     file_put_contents($logFile, join("\n", $this->logs), FILE_APPEND);
     $this->logs = array();
     // clear
 }