src/RawPHP/RawApplication/Application.php
protected function initMail( array $config )
    {
        if ( isset( $config[ 'mail' ] ) )
        {
            if ( isset( $config[ 'mail' ][ 'class' ] ) )
            {
                $this->bindShared( 'RawPHP\RawMail\Contract\IMail', function () use ( $config )
                {
                    $class = $config[ 'mail' ][ 'class' ];

                    return new $class( $config );
                }
                );
            }
            else
            {
                $this->bindShared( 'RawPHP\RawMail\Contract\IMail', function () use ( $config )
                {
                    return new Mail( $config );
                }
                );
            }
        }
        else
        {
            $this->bindShared( 'RawPHP\RawMail\Contract\IMail', function ()
            {
                return new Mail();
            }
            );
        }

        $this->alias( 'RawPHP\RawMail\Contract\IMail', 'mail' );
    }
protected function initMail( array $config )
    {
        if ( isset( $config[ 'mail' ] ) )
        {
            if ( isset( $config[ 'mail' ][ 'class' ] ) )
            {
                $this->bindShared( 'RawPHP\RawMail\Contract\IMail', function () use ( $config )
                {
                    $class = $config[ 'mail' ][ 'class' ];

                    return new $class( $config );
                }
                );
            }
            else
            {
                $this->bindShared( 'RawPHP\RawMail\Contract\IMail', function () use ( $config )
                {
                    return new Mail( $config );
                }
                );
            }
        }
        else
        {
            $this->bindShared( 'RawPHP\RawMail\Contract\IMail', function ()
            {
                return new Mail();
            }
            );
        }

        $this->alias( 'RawPHP\RawMail\Contract\IMail', 'mail' );
    }
protected function initMail ( array $ config ) { if ( isset ( $ config [ 'mail' ] ) ) { if ( isset ( $ config [ 'mail' ] [ 'class' ] ) ) { $ this -> bindShared ( 'RawPHP\RawMail\Contract\IMail' , function ( ) use ( $ config ) { $ class = $ config [ 'mail' ] [ 'class' ] ; return new $ class ( $ config ) ; } ) ; } else { $ this -> bindShared ( 'RawPHP\RawMail\Contract\IMail' , function ( ) use ( $ config ) { return new Mail ( $ config ) ; } ) ; } } else { $ this -> bindShared ( 'RawPHP\RawMail\Contract\IMail' , function ( ) { return new Mail ( ) ; } ) ; } $ this -> alias ( 'RawPHP\RawMail\Contract\IMail' , 'mail' ) ; }
Initialise the mail service.

@param array $config
Initialise the mail service .