Reputation: 85
I have a Windows 2003 server with PHP 5.24 installed on it.
I have read several posts (including the PHP manual page) on the Internet that say that sendmail_path in php.ini can be set to use a program such as Fake Sendmail which has the ability to push the mail file to my MDaemon pickup directory. I have downloaded that program and attempted to use it.
The problem is that sendmail.exe never gets executed.
sendmail_path = c:\SendMail\sendmail.exe
To verify it, I setup a simple batch file that writes to test.log when executed and changed the sendmail_path to point to the batch file. I verified the batch file does indeed create my test file when run from the command line, but when I try to send mail, the file does not get created.
sendmail_path = c:\SendMail\test.bat
The batch file never gets called.
I have tried a number of different things such as creating sendmail.exe in a path of /usr/lib/sendmail in both the c: root as well as the PHP programs folder but cannot seem to force PHP to use my file.
I have also tried putting the path name in single and double quotes, but nothing works.
In my PHP mail test I get get a fail msg and my PHP logfile shows the mail attempt to be delivered, so I know the mail process is being called.
Looking for some suggestions as to what to try next.
Gave up on trying to redirect PHP mail and just configured my servers SMTP settings to accept it. Although I had wanted to have my MDaemon mail server handle the workload, this method will suffice for the limited use it will get.
Upvotes: 0
Views: 2441
Reputation: 1
You have syntax error in php.ini! Just copy php.ini-development to php.ini and set:
SMTP =
sendmail_from =
sendmail_path = "c:\SendMail\sendmail.exe -t"
Or fix error in php.ini. Enjoy
Upvotes: 0