|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30237 Can't set full name on -f 5th mail parameter
Submitted: 2004-09-26 02:06 UTC Modified: 2004-09-27 10:05 UTC
From: rtboon at xs4all dot nl Assigned:
Status: Not a bug Package: Mail related
PHP Version: 5.0.1 OS: Fedora 2
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: rtboon at xs4all dot nl
New email:
PHP Version: OS:


 [2004-09-26 02:06 UTC] rtboon at xs4all dot nl
I'm not sure whether this is a sendmail or a PHP bug, but since PHP 5 my scripts fail where I use a 5'th argument like
"-f George Bush <>" (pardon my politics :-) ) where "" would be my domain. 
I get errors now that is not a valid username.
In PHP 4.2.3 this used to work.

When I use "-f", everything is ok.

I do not use safe mode, nor any settings in php.ini.

Reproduce code:
mail( "", "Vote me!", "said it...",
        "From: George Bush <>\r\n",
        "-f George Bush <>" );

Expected result:
A mail with in the header:
Return-path: George Bush <>

Actual result:
In my sendmail log: is an unknown user.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-09-26 02:26 UTC]
Did you change the user your web server is running as?  If so, you have to add this new user to sendmail's list of trusted users.  Only a trusted user is allowed to set a -f
 [2004-09-27 10:05 UTC]
No bug here, you can not use -f to set a "realname", only an email address without spaces.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Jul 23 14:01:29 2024 UTC