#43327 [Asn->Fbk]: wrong return value from mail(), if sendmail_path is wrong

From: Date: Sun, 02 Nov 2008 13:14:34 +0000
Subject: #43327 [Asn->Fbk]: wrong return value from mail(), if sendmail_path is wrong
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-130494@lists.php.net to get a copy of this message
 ID:               43327
 Updated by:       jani@php.net
 Reported By:      carsten_sttgt at gmx dot de
-Status:           Assigned
+Status:           Feedback
 Bug Type:         Mail related
 Operating System: win32 only (?)
 PHP Version:      5CVS, 6CVS (2008-08-15)
 Assigned To:      pajoye
 New Comment:

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/




Previous Comments:
------------------------------------------------------------------------

[2008-08-26 23:28:16] jani@php.net

Pierre, this is the real issue, sendmail_path is not checked or
something?

------------------------------------------------------------------------

[2008-01-18 21:52:18] aaron at gwmicro dot com

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).

------------------------------------------------------------------------

[2007-11-19 14:40:55] jani@php.net

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] jani@php.net

Are you sure the path is actually set? Try this:

php -d sendmail_path=/foo/bar -r 'var_dump(ini_get("sendmail_path"));'


------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/43327

-- 
Edit this bug report at http://bugs.php.net/?id=43327&edit=1



Thread (19 messages)

« previous php.bugs (#130494) next »