remove('http_errors'); $stack->unshift(\WPMailSMTP\Vendor\GuzzleHttp\Middleware::httpErrors($bodySummarizer), 'http_errors'); } $client = new \WPMailSMTP\Vendor\GuzzleHttp\Client(['handler' => $stack]); } $version = null; if (\defined('WPMailSMTP\\Vendor\\GuzzleHttp\\ClientInterface::MAJOR_VERSION')) { $version = \WPMailSMTP\Vendor\GuzzleHttp\ClientInterface::MAJOR_VERSION; } elseif (\defined('WPMailSMTP\\Vendor\\GuzzleHttp\\ClientInterface::VERSION')) { $version = (int) \substr(\WPMailSMTP\Vendor\GuzzleHttp\ClientInterface::VERSION, 0, 1); } switch ($version) { case 5: return new \WPMailSMTP\Vendor\Google\Auth\HttpHandler\Guzzle5HttpHandler($client); case 6: return new \WPMailSMTP\Vendor\Google\Auth\HttpHandler\Guzzle6HttpHandler($client); case 7: return new \WPMailSMTP\Vendor\Google\Auth\HttpHandler\Guzzle7HttpHandler($client); default: throw new \Exception('Version not supported'); } } }