# [PATCH] Add information header to mail()

- Thread: https://externals.io/message/8763
- Original archive: https://news-web.php.net/php.internals/8763
- Started by Bennett on 2004-03-26T12:05:48+00:00
- Messages: 1
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #8763 — Bennett — 2004-03-26T12:05:48+00:00

URL: https://externals.io/message/8763#8763

This is a patch to add an informational header to messages sent from PHP
via the `mail()` function. This can help to track which script on a server
was used to send a message, and which client caused it to be sent.

The header added has the form: 
	X-PHP-Script: <servername><php-self> for <remote-addr> 
For example: 
	X-PHP-Script: www.example.com/~user/testapp/send-mail.php for
10.0.0.1

http://www.lancs.ac.uk/~steveb/php-mail-header-patch/

Steve.
