protected function shouldMail(Exception $exception)
    {
        // if emailing is turned off in the config
        if (config('laravelEmailExceptions.ErrorEmail.email') != true ||

            // if we dont have an email address to mail to
            !config('laravelEmailExceptions.ErrorEmail.toEmailAddress') ||

            // if we dont have an email address to mail from
            !config('laravelEmailExceptions.ErrorEmail.fromEmailAddress') ||

            $this->shouldntReport($exception) ||

            // if the exception is in the don't mail list
            $this->isInDontEmailList($exception) ||

            // if there is any app specific don't email logic
            $this->appSpecificDontEmail($exception) ||

            // if the exception has already been mailed within the last throttle period
            $this->throttle($exception) ||

            // if we've already sent the maximum amount of emails for the global throttle period
            $this->globalThrottle()
        ) {
            // we should not mail this exception
            return false;
        }

        // we made it past all the possible reasons to not email so we should mail this exception
        return true;
    }
protected function shouldMail(Exception $exception)
    {
        // if emailing is turned off in the config
        if (config('laravelEmailExceptions.ErrorEmail.email') != true ||

            // if we dont have an email address to mail to
            !config('laravelEmailExceptions.ErrorEmail.toEmailAddress') ||

            // if we dont have an email address to mail from
            !config('laravelEmailExceptions.ErrorEmail.fromEmailAddress') ||

            $this->shouldntReport($exception) ||

            // if the exception is in the don't mail list
            $this->isInDontEmailList($exception) ||

            // if there is any app specific don't email logic
            $this->appSpecificDontEmail($exception) ||

            // if the exception has already been mailed within the last throttle period
            $this->throttle($exception) ||

            // if we've already sent the maximum amount of emails for the global throttle period
            $this->globalThrottle()
        ) {
            // we should not mail this exception
            return false;
        }

        // we made it past all the possible reasons to not email so we should mail this exception
        return true;
    }
protected function shouldMail ( Exception $ exception ) { // if emailing is turned off in the config if ( config ( 'laravelEmailExceptions.ErrorEmail.email' ) != true || // if we dont have an email address to mail to ! config ( 'laravelEmailExceptions.ErrorEmail.toEmailAddress' ) || // if we dont have an email address to mail from ! config ( 'laravelEmailExceptions.ErrorEmail.fromEmailAddress' ) || $ this -> shouldntReport ( $ exception ) || // if the exception is in the don't mail list $ this -> isInDontEmailList ( $ exception ) || // if there is any app specific don't email logic $ this -> appSpecificDontEmail ( $ exception ) || // if the exception has already been mailed within the last throttle period $ this -> throttle ( $ exception ) || // if we've already sent the maximum amount of emails for the global throttle period $ this -> globalThrottle ( ) ) { // we should not mail this exception return false ; } // we made it past all the possible reasons to not email so we should mail this exception return true ; }
Determine if the exception should be mailed

@param Exception $exception
@return bool
@throws Exception
Determine if the exception should be mailed