ID: 43327 Comment by: aaron at gwmicro dot com Reported By: carsten_sttgt at gmx dot de Status: Open Bug Type: Mail related Operating System: Windows_NT PHP Version: 5.2.5 New Comment:
I have confirmed this issue under a Windows Server 2003 environment, and it continues to exist in 5.3 dev. Using the imap_mail.dll and changing all references from mail() to imap_mail() seems to resolve the problem, although changing that reference everywhere is not a reasonable solution for most everyone (including us). Previous Comments: ------------------------------------------------------------------------ [2007-11-19 14:40:55] [EMAIL PROTECTED] Propably due to wrong usage of popen() and not VCWD_POPEN(). I don't have win32 dev environment setup so someone else should deal with this. ------------------------------------------------------------------------ [2007-11-19 13:46:20] carsten_sttgt at gmx dot de > Are you sure the path is actually set? Try this: Yes: | D:\PHP>php -d sendmail_path=/foo/bar -r \ | "var_dump(ini_get('sendmail_path'));" | string(8) "/foo/bar" | |D:\PHP> Of course, setting "sendmail_path" from the command line was just for you. The same happens if I set a wrong sendmail_path in "php.ini". And as I've written above: mail() returns also TRUE, if "sendmail_path" is correct, but the sendmail binary exit with an error code != 0. ------------------------------------------------------------------------ [2007-11-19 13:24:48] [EMAIL PROTECTED] Are you sure the path is actually set? Try this: php -d sendmail_path=/foo/bar -r 'var_dump(ini_get("sendmail_path"));' ------------------------------------------------------------------------ [2007-11-19 01:40:08] carsten_sttgt at gmx dot de Description: ------------ Hello, on Windows, mail() allways returns true, regardless if sendmail_path is wrong, or sendmail returns an error code. Regards, Carsten Reproduce code: --------------- <?php error_reporting(E_ALL); $return = mail('[EMAIL PROTECTED]', 'Test', 'Test'); var_dump($return); ?> Expected result: ---------------- Like on *nix: | % ./php -d sendmail_path=/foo/bar test.php | /foo/bar: not found | bool(false) | % Actual result: -------------- On Windows: | D:\PHP>php -d sendmail_path=/foo/bar test.php | bool(true) | | D:\PHP> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=43327&edit=1