diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2009-01-09 14:59:30 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2009-01-09 14:59:30 +0000 |
commit | 905a5c0590fcb266e0adad0527de681418f0d73f (patch) | |
tree | fc293d87fe7dfa6dafb7cb30aa9f07bd02474203 /main | |
parent | 7d3d47fa272f291f7522581d814ece245b5df597 (diff) | |
download | php-git-905a5c0590fcb266e0adad0527de681418f0d73f.tar.gz |
[DOC]
Added mail logging functionality that allows logging of mail sent via
mail() function
THe logging functionality is disabled by default but can be enabled on a
per-directory or globaly via 2 INI settings.
The mail.log directive allows you to specify the file where each call to
mail() will be logged. The log file will contain the path and line # of the
calling script in addition to all of the headers indicated by the user.
The mail.add_x_header directive will introduce a X-PHP-Originating-Script
header that will contain the file name (no path) of the calling script and
the uid of the script. This combination should be sufficient for the admin
to locate the sending script.
Diffstat (limited to 'main')
-rw-r--r-- | main/main.c | 2 | ||||
-rw-r--r-- | main/php_globals.h | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/main/main.c b/main/main.c index 7ab84d2c2c..a1cd4ca0e7 100644 --- a/main/main.c +++ b/main/main.c @@ -447,6 +447,8 @@ PHP_INI_BEGIN() PHP_INI_ENTRY("SMTP", "localhost",PHP_INI_ALL, NULL) PHP_INI_ENTRY("smtp_port", "25", PHP_INI_ALL, NULL) + STD_PHP_INI_BOOLEAN("mail.add_x_header", "0", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateBool, mail_x_header, php_core_globals, core_globals) + STD_PHP_INI_ENTRY("mail.log", NULL, PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateString, mail_log, php_core_globals, core_globals) PHP_INI_ENTRY("browscap", NULL, PHP_INI_SYSTEM, NULL) PHP_INI_ENTRY("memory_limit", "128M", PHP_INI_ALL, OnChangeMemoryLimit) PHP_INI_ENTRY("precision", "14", PHP_INI_ALL, OnSetPrecision) diff --git a/main/php_globals.h b/main/php_globals.h index 8c1f0951e6..64b2f734a9 100644 --- a/main/php_globals.h +++ b/main/php_globals.h @@ -165,6 +165,9 @@ struct _php_core_globals { long user_ini_cache_ttl; char *request_order; + + zend_bool mail_x_header; + char *mail_log; }; |