News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Ilia Alshanetsky's Blog:
Mail Logging for PHP 5.3+
January 12, 2009 @ 12:53:12

Ilia Alshanetsky has officially submitted his logging patch for the mail function in PHP:

I've finally got of my ass and committed my mail logging patch I've written almost 2 years ago. This functionality is predominantly aimed at shared hosters that often have a problem identifying people who abuse the mail() function to send an in-ordinate amount of spam or hacked scripts used for the some purpose. The logging functionality is disabled by default but can be enabled on a per-directory or globally via 2 INI settings.

A new directive in your php.ini file (mail.log) lets you specify where the mail log needs to go. You can also use the mail.add_x_header setting to add in a mail header with the name of the script that sent it (and the UID).

It will be included in PHP 5.3 but if you're running PHP 5.2 and want to get a jump on it, here's the patch.

28 comments voice your opinion now!
mail logging patch php5 phpini log header originating script


blog comments powered by Disqus

Similar Posts

Lukas Smith's Blog: Chatting with Rasmus (part two and three)

Vexxhost.com: Top 5 new (and cool!) features in PHP5 that you probably haven't heard of

IBM developerWorks: 30 game scripts you can write in PHP, Part 1: Creating 10 fundamental scripts

Stefan Mischook's Blog: Book Review: PHP 5 in Practice

Liip Blog: New in Symfony 2.4: Show logs in console


Community Events





Don't see your event here?
Let us know!


release podcast symfony2 community refactor threedevsandamaybe code opinion framework list interview developer configure install introduction testing laravel language series unittest

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework