![Picture of Michael Hosford Picture of Michael Hosford](/picture/user/816549.jpg)
Michael Hosford - 2012-10-03 00:00:40 -
In reply to message 1 from Michael Hosford
OK, so it's two years later, and I just realized that line 537 of dSendMail2.inc.php was correct in its original form.
The problem of the logfile not being opened occurred because I based my "mass mailer" code on the example code in example-MassMailer.php, which attempts to set the name of the logfile with the following code:
var $logFile = "send-".date('Y-m-d H-i-s').".dat";
Here, $logFile is being assigned a string value, but dSendMail2.inc.php expects $logFile to be the handle of an open file.
Since $logFile wasn't empty, dSendMail2.inc.php didn't open a new logfile, but when it tried to write to the file, it couldn't.
So I commented out the above line and restored line 537 to:
if(!$this->logFile)
which works better because it doesn't create a new logfile every time the _log() function is called. :-)