Why does error_log() always send exactly 3 emails?
I'm using the error_log() function like so:
error_log($errorstring, 1, 'myemail@gmail.com');
And it works fine, but every single time it is executed I get exactly 3 copies of the same email sp开发者_如何学Caced about 1 or 2 seconds apart. There is no loop or anything that it's in, this is simply to notify me of a failed login attempt, so it is only called once before it die()s.
Anyone have any bright ideas on this?
EDIT: Sorry forgot to mention, this is in PHP using the error_log() function.
EDIT2: I have switched to using the custom error handler found here:
http://www.tonymarston.net/php-mysql/errorhandler.html
What I have discovered is that while MySQL errors generate only a single email as intended, non-MySQL errors generate the three emails. It's always three... never more or less, and they are spaced anywhere from 0 to 2 seconds apart, based on the timestamp sent in the emails.
Anyone have any other ideas why in the world this would be happening??
PHP MANUAL
error_log($errorstring, 1, 'myemail@gmail.com',string $extra_header);
1
message is sent by email to the address in the destination parameter. This is the only message type where the fourth parameter
, extra_headers is used.
extra_headers
The extra headers. It's used when the message_type
parameter is set to 1
. This message type uses the same internal function as mail() does.
精彩评论