/** * 共通のアクセスログに概要を記録 * @param self $log */ private static function writeMailErrorLogFile(self $log) { $timestamp = $log->timestamp; $remoteIp = $log->remoteIp; $logContents = $log->getContents(); $logFile = new MailErrorLogFile($timestamp, $remoteIp); $logFile->setLogContents($logContents); $logFile->write(); }
/** * メール送信ログ * @param ExtCakeEmail $mail */ public static function writeMailResult(ExtCakeEmail $mail, $sendResult) { $auth = self::$auth; $time = self::$timestamp; $remoteIp = self::$remoteIp; if ($sendResult) { $log = new MailSuccessLog($time, $remoteIp); $log->setAuth($auth); $log->setExtCakeEmail($mail); $log->write(); } else { $log = new MailErrorLog($time, $remoteIp); $log->setAuth($auth); $log->setExtCakeEmail($mail); $log->write(); } }