summaryrefslogtreecommitdiff
path: root/ext/standard/mail.c
diff options
context:
space:
mode:
authorDerick Rethans <derick@php.net>2003-02-26 20:04:16 +0000
committerDerick Rethans <derick@php.net>2003-02-26 20:04:16 +0000
commit424c41a72e0521cbaee9ffa2e5188316843699d7 (patch)
tree9496da08e789b5694c7097b0fc26a2c49662164c /ext/standard/mail.c
parent17acc55ad0a3aeacb350fae608b86b712c7fa9cf (diff)
downloadphp-git-424c41a72e0521cbaee9ffa2e5188316843699d7.tar.gz
- Added an extra ini setting with which extra commands can be forced to
the sendmail deamon on a per-vhost base. The value in this ini setting will override all extra commands passed as the 5th parameter to mail() and will work in Safe Mode. @- Added an extra ini setting (mail_force_extra_paramaters) which forces @ the addition of the specified parameters to be passed as extra @ parameters to the sendmail binary. These parameters will always replace @ the value of the 5th parameter to mail(), even in safe mode. (Derick)
Diffstat (limited to 'ext/standard/mail.c')
-rw-r--r--ext/standard/mail.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/standard/mail.c b/ext/standard/mail.c
index 3dd51cb3df..6b4f701734 100644
--- a/ext/standard/mail.c
+++ b/ext/standard/mail.c
@@ -86,6 +86,7 @@ PHP_FUNCTION(mail)
char *subject=NULL, *extra_cmd=NULL;
int to_len, message_len, headers_len;
int subject_len, extra_cmd_len, i;
+ char *force_extra_parameters = INI_STR("mail_force_extra_parameters");
if (PG(safe_mode) && (ZEND_NUM_ARGS() == 5)) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "SAFE MODE Restriction in effect. The fifth parameter is disabled in SAFE MODE.");
@@ -137,7 +138,9 @@ PHP_FUNCTION(mail)
}
}
- if (extra_cmd) {
+ if (force_extra_parameters) {
+ extra_cmd = estrdup(force_extra_parameters);
+ } else if (extra_cmd) {
extra_cmd = php_escape_shell_cmd(extra_cmd);
}