/** * Report or log an exception. * * This is a great spot to send exceptions to Sentry, Bugsnag, etc. * * @param \Exception $e * @return void */ public function report(Exception $e) { if ($this->shouldReport($e) && app()->environment() == 'local') { $this->mailer->getSwiftMailer()->send(SwiftMessage::newInstance(null)->addTo('log@localhost')->addFrom('noreply@localhost', 'Laravel Drydock')->setBody($this->render(null, $e)->getContent())->setContentType('text/html')); } parent::report($e); }
/** * Get the Swift Mailer instance. * * @return \Swift_Mailer * @static */ public static function getSwiftMailer() { return \Illuminate\Mail\Mailer::getSwiftMailer(); }