]> granicus.if.org Git - php/commitdiff
- Always enable mail() function
authorJohannes Schlüter <johannes@php.net>
Wed, 11 Jul 2007 17:39:04 +0000 (17:39 +0000)
committerJohannes Schlüter <johannes@php.net>
Wed, 11 Jul 2007 17:39:04 +0000 (17:39 +0000)
acinclude.m4
ext/mbstring/mbstring.c
ext/standard/basic_functions.c
ext/standard/mail.c
ext/standard/php_mail.h
main/config.w32.h
main/main.c
win32/build/config.w32.h.in

index 55875a3b449c8ed92ad5422b3a68f92e1dfcaf34..7c8d82b44bbdb38ea5a4b1feb9947b46fa54513e 100644 (file)
@@ -1991,9 +1991,6 @@ dnl
 AC_DEFUN([PHP_PROG_SENDMAIL], [
   PHP_ALT_PATH=/usr/bin:/usr/sbin:/usr/etc:/etc:/usr/ucblib:/usr/lib
   AC_PATH_PROG(PROG_SENDMAIL, sendmail,[], $PATH:$PHP_ALT_PATH)
-  if test -n "$PROG_SENDMAIL"; then
-    AC_DEFINE(HAVE_SENDMAIL,1,[whether you have sendmail])
-  fi
   PHP_SUBST(PROG_SENDMAIL)
 ])
 
index fa2cb5dcc1057db9e7a27fea069ebabca11a31cc..cfbd79592ef0f1e64009e22616ea59d97637e22f 100644 (file)
@@ -3317,7 +3317,6 @@ PHP_FUNCTION(mb_decode_numericentity)
 /* {{{ proto int mb_send_mail(string to, string subject, string message [, string additional_headers [, string additional_parameters]])
  *  Sends an email message with MIME scheme
  */
-#if HAVE_SENDMAIL
 
 #define SKIP_LONG_HEADER_SEP_MBSTRING(str, pos)                                                                                \
        if (str[pos] == '\r' && str[pos + 1] == '\n' && (str[pos + 2] == ' ' || str[pos + 2] == '\t')) {        \
@@ -3821,16 +3820,6 @@ PHP_FUNCTION(mb_send_mail)
 #undef PHP_MBSTR_MAIL_MIME_HEADER2
 #undef PHP_MBSTR_MAIL_MIME_HEADER3
 #undef PHP_MBSTR_MAIL_MIME_HEADER4
-
-#else  /* HAVE_SENDMAIL */
-
-PHP_FUNCTION(mb_send_mail)
-{
-       RETURN_FALSE;
-}
-
-#endif /* HAVE_SENDMAIL */
-
 /* }}} */
 
 /* {{{ proto mixed mb_get_info([string type])
index cc01619e7e5f5e5d8cdd25484de416e7fb5cb204..fd83b8d1b2947fe2248abc59b7a69b22a193aa25 100644 (file)
@@ -1816,7 +1816,6 @@ ZEND_END_ARG_INFO()
 #endif
 /* }}} */
 /* {{{ mail.c */
-#ifdef HAVE_SENDMAIL
 static
 ZEND_BEGIN_ARG_INFO(arginfo_ezmlm_hash, 0)
        ZEND_ARG_INFO(0, addr)
@@ -1830,7 +1829,6 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_mail, 0, 0, 3)
        ZEND_ARG_INFO(0, additional_headers)
        ZEND_ARG_INFO(0, additional_parameters)
 ZEND_END_ARG_INFO()
-#endif
 /* }}} */
 /* {{{ math.c */
 static
@@ -3693,10 +3691,8 @@ zend_function_entry basic_functions[] = { /* {{{ */
        PHP_FALIAS(diskfreespace,               disk_free_space,                                                arginfo_disk_free_space)
 
        /* functions from mail.c */
-#ifdef HAVE_SENDMAIL
        PHP_FE(mail,                                                                                                                    arginfo_mail)
        PHP_FE(ezmlm_hash,                                                                                                              arginfo_ezmlm_hash)
-#endif
 
        /* functions from syslog.c */
 #ifdef HAVE_SYSLOG_H
@@ -4944,14 +4940,9 @@ PHPAPI int _php_error_log(int opt_err, char *message, char *opt, char *headers T
 
                case 1:         /*send an email */
                        {
-#if HAVE_SENDMAIL
                                if (!php_mail(opt, "PHP error_log message", message, headers, NULL TSRMLS_CC)) {
                                        return FAILURE;
                                }
-#else
-                               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Mail option not available!");
-                               return FAILURE;
-#endif
                        }
                        break;
 
index fff0c53905c073b3f684a87b4cf73d58a3e0c4f8..89432c4c0c9066a54faab0c8e3edccd6dd475d56 100644 (file)
@@ -35,7 +35,6 @@
 #include "php_ini.h"
 #include "exec.h"
 
-#if HAVE_SENDMAIL
 #ifdef PHP_WIN32
 #include "win32/sendmail.h"
 #endif
@@ -271,13 +270,6 @@ PHP_MINFO_FUNCTION(mail)
 }
 /* }}} */
 
-#else
-
-PHP_FUNCTION(mail) {}
-PHP_MINFO_FUNCTION(mail) {}
-
-#endif
-
 /*
  * Local variables:
  * tab-width: 4
index 84f256ec8b0ddee13bd1ada085799ab64e1ff4ab..99d32c4d8c0f2e213c5b10f10d9c3be9b11b81e3 100644 (file)
 PHP_FUNCTION(mail);
 PHP_MINFO_FUNCTION(mail);
 
-#if HAVE_SENDMAIL
-
 PHP_FUNCTION(ezmlm_hash);
 PHPAPI extern int php_mail(char *to, char *subject, char *message, char *headers, char *extra_cmd TSRMLS_DC);
 
-#endif
-
 #endif /* PHP_MAIL_H */
index 554894e7e73582322c9280b74292f4d696819889..6dff64abdc16344f917645f880a137d83b372ff9 100644 (file)
 #undef HAVE_SETITIMER
 #undef HAVE_IODBC
 #define HAVE_LIBDL 1
-#define HAVE_SENDMAIL 1
 #define HAVE_GETTIMEOFDAY 1
 #define HAVE_PUTENV 1
 #define HAVE_LIMITS_H 1
index c1c85f508b6cecc404046a793f06670beb51bd81..36fce247073ba84c6acdb3f638f9b209133761e2 100644 (file)
@@ -341,7 +341,7 @@ static PHP_INI_MH(OnUpdateDefaultMimetype)
 #if defined(PHP_PROG_SENDMAIL) && !defined(NETWARE)
 #      define DEFAULT_SENDMAIL_PATH PHP_PROG_SENDMAIL " -t -i "
 #else
-#      define DEFAULT_SENDMAIL_PATH NULL
+#      define DEFAULT_SENDMAIL_PATH "/usr/sbin/sendmail -t -i" 
 #endif
 
 /* {{{ PHP_INI
index aefac91af119ef87d6631a4d2e35bbfd38fa58d2..91a4927321757a5450a0c2e82574ced594af3eca 100644 (file)
@@ -55,7 +55,6 @@
 #undef HAVE_SETITIMER
 #undef HAVE_IODBC
 #define HAVE_LIBDL 1
-#define HAVE_SENDMAIL 1
 #define HAVE_GETTIMEOFDAY 1
 #define HAVE_PUTENV 1
 #define HAVE_LIMITS_H 1