Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I change the subject of my php error email?

I have the following:

      error_log("big error!!", 1, my email address);

When the message is delivered it says "PHP error_log message" in the subject line.

Can someone show me how to customize the message subject?

like image 803
absentx Avatar asked Aug 02 '12 01:08

absentx


1 Answers

error_log("Error message", 1, "[email protected]", "Subject: My custom subject");

The fourth parameter of error_log allows you to specify custom headers, of which Subject is the subject of the email.

like image 92
Niet the Dark Absol Avatar answered Nov 10 '22 11:11

Niet the Dark Absol