Line 261 in /app/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php
252 $options['socket']['bindto'] = $this->params['sourceIp'].':0'; 253 } 254 255 if (isset($this->params['stream_context_options'])) { 256 $options = array_merge($options, $this->params['stream_context_options']); 257 } 258 $streamContext = stream_context_create($options); 259 260 set_error_handler(function ($type, $msg) { 261 throw new Swift_TransportException('Connection could not be established with host '.$this->params['host'].' :'.$msg); 262 }); 263 try { 264 $this->stream = stream_socket_client($host.':'.$this->params['port'], $errno, $errstr, $timeout, STREAM_CLIENT_CONNECT, $streamContext); 265 } finally { 266 restore_error_handler(); 267 }