0

Hi Daniweb Team,
I saw the below code in following url.When i implement this code i does not receive any email.I need to send email via error_log function.Can any one tell me how to do this .For your reference i mentioned the code below.
URL:
http://www.w3schools.com/php/func_error_log.asp

<?php
$test=2;
if ($test>1)
{
error_log("A custom error has been triggered",
1,"someone@example.com","From: webmaster@example.com");
}
?>

Note: When sending an email, it must contain a From header. This can be set with this parameter or in the php.ini file.

Thank you,
Prem

3
Contributors
4
Replies
5
Views
7 Years
Discussion Span
Last Post by pritaeas
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.