On Wed, 1 Aug 2001, Jani Taskinen wrote:
> I think this is good. If some resource isn't available, then the function
> using the resource shouldn't be enabled either. So the correct fix would
> be to add a error message to mail() function, IMO.
> --Jani
The fact that the machine that PHP is compiled on doesn't have a
specific binary often has nothing to do with:
1) what the machine PHP will be *run on* will include
2) what sort of binaries the machine will have tomorrow
A sensible default should be provided, regardless of whether or not
you can set it in php.ini.
As for bumping a warning when sendmail_path is null in php_mail -
that sounds like a good idea. How's this look like?
--
<---------------------------------------------------------------------->
Heikki Korpela -- [EMAIL PROTECTED] -- http://iki.fi/heko/
===================================================================
RCS file: /repository/php4/ext/standard/mail.c,v
retrieving revision 1.41
diff -u -IExp -b -B -p -r1.41 mail.c
--- mail.c 30 Jul 2001 06:18:06 -0000 1.41
+++ mail.c 1 Aug 2001 05:05:02 -0000
@@ -154,6 +154,7 @@ PHPAPI int php_mail(char *to, char *subj
}
return 1;
#else
+ php_error(E_WARNING, "Your sendmail_path is null - cannot send mail!
+Check php.ini");
return 0;
#endif
}
@@ -192,6 +193,7 @@ PHPAPI int php_mail(char *to, char *subj
#endif
#endif
{
+ php_error(E_WARNING, "Mail delivery program returned with exit
+code: %d", ret);
return 0;
} else {
return 1;
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]