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
 [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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 17:01:31 2024 UTC