File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change 43
43
#include "ext/standard/php_string.h"
44
44
#include "ext/date/php_date.h"
45
45
46
+ #define SENDMAIL_DEBUG 0
47
+
46
48
/*enum
47
49
{
48
50
DO_CONNECT = WM_USER +1
@@ -770,6 +772,10 @@ static int MailConnect()
770
772
#endif
771
773
SOCKADDR_IN sock_in ;
772
774
775
+ #if SENDMAIL_DEBUG
776
+ return 0 ;
777
+ #endif
778
+
773
779
/* Create Socket */
774
780
if ((PW32G (mail_socket ) = socket (PF_INET , SOCK_STREAM , 0 )) == INVALID_SOCKET ) {
775
781
return (FAILED_TO_OBTAIN_SOCKET_HANDLE );
@@ -856,6 +862,12 @@ static int Post(LPCSTR msg)
856
862
int slen ;
857
863
int index = 0 ;
858
864
865
+ #if SENDMAIL_DEBUG
866
+ if (msg )
867
+ printf ("POST: '%s'\n" , msg );
868
+ return (SUCCESS );
869
+ #endif
870
+
859
871
while (len > 0 ) {
860
872
if ((slen = send (PW32G (mail_socket ), msg + index , len , 0 )) < 1 )
861
873
return (FAILED_TO_SEND );
@@ -884,6 +896,10 @@ static int Ack(char **server_response)
884
896
int Index = 0 ;
885
897
int Received = 0 ;
886
898
899
+ #if SENDMAIL_DEBUG
900
+ return (SUCCESS );
901
+ #endif
902
+
887
903
again :
888
904
889
905
if ((rlen = recv (PW32G (mail_socket ), buf + Index , ((MAIL_BUFFER_SIZE ) - 1 ) - Received , 0 )) < 1 ) {
You can’t perform that action at this time.
0 commit comments