lib/classes/Swift/Transport/EsmtpTransport.php
private function getCapabilities($ehloResponse)
    {
        $capabilities = [];
        $ehloResponse = trim($ehloResponse);
        $lines = explode("\r\n", $ehloResponse);
        array_shift($lines);
        foreach ($lines as $line) {
            if (preg_match('/^[0-9]{3}[ -]([A-Z0-9-]+)((?:[ =].*)?)$/Di', $line, $matches)) {
                $keyword = strtoupper($matches[1]);
                $paramStr = strtoupper(ltrim($matches[2], ' ='));
                $params = !empty($paramStr) ? explode(' ', $paramStr) : [];
                $capabilities[$keyword] = $params;
            }
        }

        return $capabilities;
    }
private function getCapabilities($ehloResponse)
    {
        $capabilities = [];
        $ehloResponse = trim($ehloResponse);
        $lines = explode("\r\n", $ehloResponse);
        array_shift($lines);
        foreach ($lines as $line) {
            if (preg_match('/^[0-9]{3}[ -]([A-Z0-9-]+)((?:[ =].*)?)$/Di', $line, $matches)) {
                $keyword = strtoupper($matches[1]);
                $paramStr = strtoupper(ltrim($matches[2], ' ='));
                $params = !empty($paramStr) ? explode(' ', $paramStr) : [];
                $capabilities[$keyword] = $params;
            }
        }

        return $capabilities;
    }
private function getCapabilities ( $ ehloResponse ) { $ capabilities = [ ] ; $ ehloResponse = trim ( $ ehloResponse ) ; $ lines = explode ( "\r\n" , $ ehloResponse ) ; array_shift ( $ lines ) ; foreach ( $ lines as $ line ) { if ( preg_match ( '/^[0-9]{3}[ -]([A-Z0-9-]+)((?:[ =].*)?)$/Di' , $ line , $ matches ) ) { $ keyword = strtoupper ( $ matches [ 1 ] ) ; $ paramStr = strtoupper ( ltrim ( $ matches [ 2 ] , ' =' ) ) ; $ params = ! empty ( $ paramStr ) ? explode ( ' ' , $ paramStr ) : [ ] ; $ capabilities [ $ keyword ] = $ params ; } } return $ capabilities ; }
Determine ESMTP capabilities by function group
Determine ESMTP capabilities by function group