php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #66989 mail() Example #3 has a typographical error
Submitted: 2014-03-31 17:00 UTC Modified: 2014-03-31 17:08 UTC
From: michaeldeweil at gmail dot com Assigned:
Status: Not a bug Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: michaeldeweil at gmail dot com
New email:
PHP Version: OS:

 

 [2014-03-31 17:00 UTC] michaeldeweil at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/function.mail
---
There is a typographical error in example #3 for the mail function where it shows how to send mail with an additional command line parameter.

The displayed version shows the "-f" flag before the "webmaster@example.com" as part of the address ('-fwebmaster@example.com') whereas it probably should not ('-f webmaster@example.com').

..as the example currently is displayed:
mail('nobody@example.com', 'the subject', 'the message', null,
   '-fwebmaster@example.com');

..as it probably should be displayed:
mail('nobody@example.com', 'the subject', 'the message', null,
   '-f webmaster@example.com');



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-03-31 17:08 UTC] aharvey@php.net
-Status: Open +Status: Not a bug
 [2014-03-31 17:08 UTC] aharvey@php.net
This is correct: sendmail specifies -f as not having a space after it, per http://www.freebsd.org/cgi/man.cgi?query=sendmail&sektion=8. In practice, MTAs implementing the sendmail interface generally support both, but the PHP manual is technically correct (the best kind of correct).
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 03 15:01:34 2025 UTC