php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #34872 can `s.b. <somebody@somewhere.com>' be used as the `to' parameter to mail() ?
Submitted: 2005-10-14 16:34 UTC Modified: 2005-10-14 17:36 UTC
From: nyvsld at gmail dot com Assigned:
Status: Not a bug Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
 [2005-10-14 16:34 UTC] nyvsld at gmail dot com
Description:
------------
in page http://www.php.net/manual/en/function.mail.php
there is conflict between quote 1 and quote 2,
on the form of the first parameter to mail(),
about whether we can pass `somebody <somebody@somewhere.com>' as the `to' parameter to mail(),
see below:

-----quote 1-----
Parameters

to

    Receiver, or receivers of the mail.

    The formatting of this string must comply with RFC 2822. Some examples are:

    user@example.com
    user@example.com, anotheruser@example.com
    User <user@example.com>
    User <user@example.com>, Another User <anotheruser@example.com>
-----quote 1 end -----
-----quote 2-----
Notes
    ...

    As such, the to parameter should not be an address in the form of "Something <someone@example.com>". The mail command may not parse this properly while talking with the MTA. 
-----quote 2 end ----

Reproduce code:
---------------
N/A

Expected result:
----------------
mail('somebody@somewhere.com', ...)
 or
mail('somebody <somebody@somewhere.com>')
 ?


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-10-14 17:36 UTC] theseer@php.net
This is not a bug.

The note is talking about limitations when used on the windows plattform where an external MTA is used.



 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Nov 20 03:00:01 2025 UTC