/** * Send Email Notification if enabled * @param boolean $result * @return boolean */ protected function sendNotification($result) { $projectName = $this->getConfig()->general('name', false); $projectEmail = $this->getConfig()->general('email', false); $notificationsEnabled = $this->getConfig()->general('notifications', false); // We need notifications enabled, and a project name and email to send the notification if (!$projectName || !$projectEmail || !$notificationsEnabled) { return false; } $mailer = new Mailer(); $mailer->setAddress($projectEmail)->setProject($projectName)->setLogFile(Console::getLogFile())->setEnvironment($this->getConfig()->getEnvironment())->send($result); return true; }