ID:               28976
 Updated by:       [EMAIL PROTECTED]
 Reported By:      kdaniel at aosepc dot com
-Status:           Open
+Status:           Closed
 Bug Type:         Mail related
 Operating System: Windows\Apache
 PHP Version:      4.3.6
 New Comment:

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.

Address passed as "From:" in headers is now used if sendmail_from is
empty.



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

[2005-01-02 15:48:52] alexhuang at anet dot net dot tw

Please try to make a copy of "c:\winnt\php.ini" to "c:\php".

After I copied the file, no more error messages.

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

[2004-11-04 16:53:59] Charlesk at netgaintechnology dot com

It seems to me that this was thought of but never implemented.  In
sendmail.c:

        if (headers) {
                char *pos = NULL;
                size_t i;

                /* Use PCRE to trim the header into the right format */
                if (NULL == (headers = php_win32_mail_trim_header(headers
TSRMLS_CC))) {
                        *error = W32_SM_PCRE_ERROR;
                        return FAILURE;
                }

                /* Create a lowercased header for all the searches so we're 
finally
case
                 * insensitive when searching for a pattern. */
                if (NULL == (headers_lc = estrdup(headers))) {
                        efree(headers);
                        *error = OUT_OF_MEMORY;
                        return FAILURE;
                }
                for (i = 0; i < strlen(headers_lc); i++) {
                        headers_lc[i] = tolower(headers_lc[i]);
                }
        }
 
        /* Fall back to sendmail_from php.ini setting */
        if (mailRPath && *mailRPath) {
                RPath = estrdup(mailRPath);
        }
        else if (INI_STR("sendmail_from")) {
                RPath = estrdup(INI_STR("sendmail_from"));
        } else {
                if (headers) {
                        efree(headers);
                        efree(headers_lc);
                }
                *error = W32_SM_SENDMAIL_FROM_NOT_SET;
                return FAILURE;
        }


I would think that in the if (headers) section there should be some
code to set the mailRPath if the From header is found in headers.  That
way when it falls into the if (mailRPath && *mailRPath) section it will
appropriately assign the from to the return path.  

Can this be fixed soon?

Thanks
Charles

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

[2004-08-24 19:53:10] dv at josheli dot com

http://marc.theaimsgroup.com/?l=php-dev&m=109286883222906&w=2

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

[2004-08-23 19:02:33] joe at inexo dot com

It's not coming from php.ini.

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

[2004-08-18 23:07:34] dv at josheli dot com

using cli PHP 5 and latest snap (php5-win32-200408181430), the extra
"From:" header does not seem to work.

test.php:
<?php
mail('[EMAIL PROTECTED]','subject','body',"From: [EMAIL PROTECTED]");
?>

Warning: mail(): "sendmail_from" not set in php.ini or custom "From:"
header missing in C:\dev\quiktests\test.php on line 3

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

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/28976

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

Reply via email to