JayD83 Posted March 23, 2010 Share Posted March 23, 2010 Anyone as a clue why this stops in mid execution and only reaches up to the following??? 220 mail.primus.ca mail-09.primus.ca ESMTP Daemon - Outbound1 250-mail-09.primus.ca Hello fctnnbsc29w-.pppoe.bellaliant.net 250-SIZE 104857600 250-PIPELINING 250-AUTH PLAIN LOGIN 250-STARTTLS 250 HELP 334 [uid-removed-for-security] 334 [pwd-removed-for-security] 235 Authentication succeeded PHP Codes <?php $host = "smtp.primus.ca"; $port = 25; $fp = fsockopen ($host, $port, $errno, $errstr); if (!$fp) { echo "$errstr ($errno)<br>\n"; } $receive = fgets ($fp,2024); print"$receive <br>"; fputs ($fp, "EHLO smtp.primus.ca\n"); $receive = ""; $receive = fgets ($fp,2024); print"$receive <br>"; fputs ($fp, "AUTH LOGIN\r\n"); $receive = ""; $receive = fgets ($fp,2024); print"$receive <br>"; fputs ($fp, "[REMOVED-FOR-SECURITY]\r\n"); $receive = ""; $receive = fgets ($fp,2024); print"$receive <br>"; fputs ($fp, "[REMOVED-FOR-SECURITY]\r\n"); $receive = ""; $receive = fgets ($fp,2024); print"$receive <br>"; fputs ($fp, "MAIL FROM: [email protected]\r\n"); $receive = ""; $receive = fgets ($fp,2024); print"$receive <br>"; fputs ($fp, "RCPT TO: [email protected]"); $receive = ""; $receive = fgets ($fp,2024); print"$receive <br>"; fputs ($fp, "DATA\r\n"); $receive = ""; $receive = fgets ($fp,2024); print"$receive <br>"; fputs ($fp, "Subject: Test Report\r\n"); $receive = ""; $receive = fgets ($fp,2024); print"$receive <br>"; fputs ($fp, "Its Working"); fputs ($fp, "\n\n"); fputs ($fp, ".\n"); fputs ($fp, "quit\r\n"); $receive = ""; $receive = fgets ($fp,2024); print"$receive <br>"; fclose ($fp); ?> Link to comment https://forums.phpfreaks.com/topic/196217-socket-smtp-seem-to-stop-in-mid-execution/ Share on other sites More sharing options...
JayD83 Posted March 25, 2010 Author Share Posted March 25, 2010 Seriously anyone??? Link to comment https://forums.phpfreaks.com/topic/196217-socket-smtp-seem-to-stop-in-mid-execution/#findComment-1031561 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.