php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #17513 Default Additional command of mail()
Submitted: 2002-05-29 15:21 UTC Modified: 2003-02-26 14:11 UTC
Votes:5
Avg. Score:5.0 ± 0.0
Reproduced:5 of 5 (100.0%)
Same Version:1 (20.0%)
Same OS:1 (20.0%)
From: eurower at eurower dot com Assigned:
Status: Closed Package: Feature/Change Request
PHP Version: 4.1.2 OS: Redhat 7.1
Private report: No CVE-ID: None
 [2002-05-29 15:21 UTC] eurower at eurower dot com
Hello,

when a user put in his script the mail() function, the mail is sent and we see in the log from: apache@localdomain
If we set the additional command -ffromme@domain.com so the log become from: fromme@domain.com and any error return mail will be send to fromme (and no more apache)...
Meanwhile, this news feature is not implemented by all projets in php, of course, a user can not set this additional command, so, the mail will be send from apache and it's not recommanded ...
The best will be that if the additional header is not set, so the mail() function serach the From line in the header and put it as additional header ...(the Error-to line is not always set, but the from is always)
So, the very best will that if the additional header is not set AND there is no From line in the normal header, so the mail() return false.
This option can for example, be activated from the php.ini.
So, if a administrator want it, it can force user to set the From line in the header and/or a additional command to identify mail in the log files and for not error mal return to apache (and not user)

Thank you very much ...

Best regards,

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-02-26 14:11 UTC] derick@php.net
This bug has been fixed in CVS.

In case this was a PHP problem, 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/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.

From PHP 5 you can force it with the ini setting "mail_force_extra_parameters", see also:
http://news.php.net/article.php?group=php.cvs&article=19210

Derick

 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue Jul 15 23:01:33 2025 UTC