src/Event.php
public function emailOutput($address)
    {
        if (is_null($this->_output)
            || $this->_output == $this->getDefaultOutput()
        ) {
            throw new InvalidCallException('Must direct output to file in order to email results.');
        }
        $address = is_array($address) ? $address : func_get_args();

        return $this->then(function (Application $app) use ($address) {
            $this->sendEmail($app->mailer, $address);
        });
    }
public function emailOutput($address)
    {
        if (is_null($this->_output)
            || $this->_output == $this->getDefaultOutput()
        ) {
            throw new InvalidCallException('Must direct output to file in order to email results.');
        }
        $address = is_array($address) ? $address : func_get_args();

        return $this->then(function (Application $app) use ($address) {
            $this->sendEmail($app->mailer, $address);
        });
    }
public function emailOutput ( $ address ) { if ( is_null ( $ this -> _output ) || $ this -> _output == $ this -> getDefaultOutput ( ) ) { throw new InvalidCallException ( 'Must direct output to file in order to email results.' ) ; } $ address = is_array ( $ address ) ? $ address : func_get_args ( ) ; return $ this -> then ( function ( Application $ app ) use ( $ address ) { $ this -> sendEmail ( $ app -> mailer , $ address ) ; } ) ; }
Register the send email logic.

@param array $address

@return $this
Register the send email logic .