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.

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,

Are your smtp settings correct in the php.ini ?

How to check my smtp settings are correct or wrong.

Goto your PHP.ini file (search from XAMP folder)

1. Open the file in notepad
Search keyword ([mail function])
2. [mail function]
; For Win32 only.
; http://php.net/smtp
SMTP = localhost //Change your smtp address
; http://php.net/smtp-port
smtp_port = 25 //Change port if you need

Thats it!

And you need to be sure that the from address is allowed to send emails using that smtp server.