72014Aug

PHP Mail Function Logging – mail.log

PHP 5.3.0 comes with many new features and one of important concept is Logging of Mail Function.

What does it do ?

Log all mail() calls including the full path of the script, line number, to address and headers.

How does it work ?
  • Go to your php.ini file.
  • Find mail.log in that file.
  • Enable the mail.log by removing semicolon.
  • Change its value to the file where you want to store the logs.
Note
  • You can not set or change mail.log value using ini_set function.
  • This logging only works with php mail function.