/** * 共通のアクセスログに概要を記録 * @param self $log */ private static function writeMailSuccessLogFile(self $log) { $timestamp = $log->timestamp; $remoteIp = $log->remoteIp; $logContents = $log->getMailSuccessLogContents(); $logFile = new MailSuccessLogFile($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(); } }