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 49
49
#include "ext/standard/php_string.h"
50
50
#include "ext/date/php_date.h"
51
51
52
+ #define SENDMAIL_DEBUG 0
53
+
52
54
/*enum
53
55
{
54
56
DO_CONNECT = WM_USER +1
@@ -780,6 +782,10 @@ static int MailConnect()
780
782
#endif
781
783
SOCKADDR_IN sock_in ;
782
784
785
+ #if SENDMAIL_DEBUG
786
+ return 0 ;
787
+ #endif
788
+
783
789
/* Create Socket */
784
790
if ((PW32G (mail_socket ) = socket (PF_INET , SOCK_STREAM , 0 )) == INVALID_SOCKET ) {
785
791
return (FAILED_TO_OBTAIN_SOCKET_HANDLE );
@@ -866,6 +872,12 @@ static int Post(LPCSTR msg)
866
872
int slen ;
867
873
int index = 0 ;
868
874
875
+ #if SENDMAIL_DEBUG
876
+ if (msg )
877
+ printf ("POST: '%s'\n" , msg );
878
+ return (SUCCESS );
879
+ #endif
880
+
869
881
while (len > 0 ) {
870
882
if ((slen = send (PW32G (mail_socket ), msg + index , len , 0 )) < 1 )
871
883
return (FAILED_TO_SEND );
@@ -894,6 +906,10 @@ static int Ack(char **server_response)
894
906
int Index = 0 ;
895
907
int Received = 0 ;
896
908
909
+ #if SENDMAIL_DEBUG
910
+ return (SUCCESS );
911
+ #endif
912
+
897
913
again :
898
914
899
915
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