static public function smtp(
        $host = null,
        $user = null,
        $pass = null,
        $port = null,
        $ssl = false,
        $tls = false
    ) {
        if (!$host) {
            $host = Config::get('email');
        }
        
        $debug = false;
        
        if (is_array($host)) {
            $user = $host['user'];
            $pass = isset($host['password']) ? $host['password'] : $host['pass'];
            $port = isset($host['port']) && $host['port'] ? $host['port'] : null;
            $ssl  = isset($host['ssl']) && $host['ssl'] ? $host['ssl'] : null;
            $tls  = isset($host['tls']) && $host['tls'] ? $host['tls'] : null;
            
            $host = $host['host'];
            
            $debug = isset($host['debugging']) ? $host['debugging'] : (isset($host['debug']) ? $host['debug'] : false);
        }
        
        $instance = Smtp::instance($host, $user, $pass, $port, $ssl, $tls);
        $instance->setDebugging($debug);
        return $instance;
    }
static public function smtp(
        $host = null,
        $user = null,
        $pass = null,
        $port = null,
        $ssl = false,
        $tls = false
    ) {
        if (!$host) {
            $host = Config::get('email');
        }
        
        $debug = false;
        
        if (is_array($host)) {
            $user = $host['user'];
            $pass = isset($host['password']) ? $host['password'] : $host['pass'];
            $port = isset($host['port']) && $host['port'] ? $host['port'] : null;
            $ssl  = isset($host['ssl']) && $host['ssl'] ? $host['ssl'] : null;
            $tls  = isset($host['tls']) && $host['tls'] ? $host['tls'] : null;
            
            $host = $host['host'];
            
            $debug = isset($host['debugging']) ? $host['debugging'] : (isset($host['debug']) ? $host['debug'] : false);
        }
        
        $instance = Smtp::instance($host, $user, $pass, $port, $ssl, $tls);
        $instance->setDebugging($debug);
        return $instance;
    }
static public function smtp ( $ host = null , $ user = null , $ pass = null , $ port = null , $ ssl = false , $ tls = false ) { if ( ! $ host ) { $ host = Config :: get ( 'email' ) ; } $ debug = false ; if ( is_array ( $ host ) ) { $ user = $ host [ 'user' ] ; $ pass = isset ( $ host [ 'password' ] ) ? $ host [ 'password' ] : $ host [ 'pass' ] ; $ port = isset ( $ host [ 'port' ] ) && $ host [ 'port' ] ? $ host [ 'port' ] : null ; $ ssl = isset ( $ host [ 'ssl' ] ) && $ host [ 'ssl' ] ? $ host [ 'ssl' ] : null ; $ tls = isset ( $ host [ 'tls' ] ) && $ host [ 'tls' ] ? $ host [ 'tls' ] : null ; $ host = $ host [ 'host' ] ; $ debug = isset ( $ host [ 'debugging' ] ) ? $ host [ 'debugging' ] : ( isset ( $ host [ 'debug' ] ) ? $ host [ 'debug' ] : false ) ; } $ instance = Smtp :: instance ( $ host , $ user , $ pass , $ port , $ ssl , $ tls ) ; $ instance -> setDebugging ( $ debug ) ; return $ instance ; }
Constructor - Store connection information

@param  *string  $host The SMTP host
@param  string   $user The mailbox user name
@param  string   $pass The mailbox password
@param  int|null $port The SMTP port
@param  bool     $ssl  Whether to use SSL
@param  bool     $tls  Whether to use TLS

@return \Wslim\Mail\Smtp
Constructor - Store connection information