GMail 421 4.7.0 Try again later, closing connection
问题 I'am trying to find out, why it fails to send mails from my server with GMail. For this I use SwiftMailer but I can enclose the problem to the following isolated code: <?php $sock = stream_socket_client('tcp://smtp.gmail.com:587', $errno, $errstr); if (false == $sock) { die('error'); } $server_response = fread($sock, 4096); echo $server_response . PHP_EOL; fclose($sock); When I run this code on my local machine (Windows 10, XAMPP, PHP 5.6.24), the output is: 220 smtp.gmail.com ESMTP