]> granicus.if.org Git - php/commitdiff
evaluate sendmail exit status, fixes unix side of bug #5630
authorHartmut Holzgraefe <hholzgra@php.net>
Thu, 3 Aug 2000 19:26:19 +0000 (19:26 +0000)
committerHartmut Holzgraefe <hholzgra@php.net>
Thu, 3 Aug 2000 19:26:19 +0000 (19:26 +0000)
ext/standard/mail.c

index 16753a7c5cd7b473971cacbf10087bea8a03eada..d4cb79d2fc60963fb5fc5800e41906af00e8537f 100644 (file)
@@ -25,6 +25,7 @@
 #include "ext/standard/info.h"
 #if !defined(PHP_WIN32)
 #include "build-defs.h"
+#include <sysexits.h>
 #endif
 #include "php_mail.h"
 #include "php_ini.h"
@@ -151,7 +152,7 @@ int php_mail(char *to, char *subject, char *message, char *headers)
                }
                fprintf(sendmail, "\n%s\n", message);
                ret = pclose(sendmail);
-               if (ret == -1) {
+               if ((ret != EX_OK)&&(ret != EX_TEMPFAIL)) {
                        return 0;
                } else {
                        return 1;