3v4l.org

run code in 300+ PHP versions simultaneously
<?php $fp = fsockopen("smtp.gmail.com",587, $errNo, $errStr, 15); if(!$fp){ echo "not connected"; }else{ $str = fputs($fp, "EHLO"."\r\n")."\n"; $str .= fputs($fp, "STARTTLS"."\r\n")."\n"; $str .= fputs($fp, "AUTH LOGIN"."\r\n"); $str .= fputs($fp, base64_encode("murarijaiswal1989@gmail.com")."\r\n")."\n"; $str .= fputs($fp, base64_encode("murari1989.")."\r\n")."\n"; $str .= fputs($fp, "MAIL FROM:<author@gmail.com>"."\r\n")."\n"; $str .= fputs($fp, "RCPT TO:<murari@fecdirect.in>"."\r\n")."\n"; $str .= fputs($fp, "DATA"."\r\n")."\n"; $str .= fputs($fp, "Subject: This is subject"."\r\n")."\n"; $str .= fputs($fp, "This is body message"."\r\n")."\n"; $str .= fputs($fp, "."."\r\n")."\n"; $str .= fputs($fp, "QUIT"."\r\n")."\n"; echo fputs($fp, $str); fclose($fp); } ?>
Output for 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
Warning: fsockopen(): php_network_getaddresses: getaddrinfo for smtp.gmail.com failed: System error in /in/dvmWL on line 2 Warning: fsockopen(): Unable to connect to smtp.gmail.com:587 (php_network_getaddresses: getaddrinfo for smtp.gmail.com failed: System error) in /in/dvmWL on line 2 not connected
Output for 8.0.13 - 8.0.30
Warning: fsockopen(): php_network_getaddresses: getaddrinfo failed: System error in /in/dvmWL on line 2 Warning: fsockopen(): Unable to connect to smtp.gmail.com:587 (php_network_getaddresses: getaddrinfo failed: System error) in /in/dvmWL on line 2 not connected
Output for 8.0.0 - 8.0.12
Warning: fsockopen(): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /in/dvmWL on line 2 Warning: fsockopen(): Unable to connect to smtp.gmail.com:587 (php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution) in /in/dvmWL on line 2 not connected
Output for 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.40, 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.25, 7.3.0 - 7.3.12, 7.3.32 - 7.3.33, 7.4.0, 7.4.26 - 7.4.33
Warning: fsockopen(): php_network_getaddresses: getaddrinfo failed: System error in /in/dvmWL on line 2 Warning: fsockopen(): unable to connect to smtp.gmail.com:587 (php_network_getaddresses: getaddrinfo failed: System error) in /in/dvmWL on line 2 not connected
Output for 7.2.29 - 7.2.33, 7.3.16 - 7.3.31, 7.4.3 - 7.4.25
Warning: fsockopen(): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /in/dvmWL on line 2 Warning: fsockopen(): unable to connect to smtp.gmail.com:587 (php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution) in /in/dvmWL on line 2 not connected

preferences:
278.44 ms | 403 KiB | 373 Q