|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #7068 fails when 'to:' argument has the form "Name <>"
Submitted: 2000-10-06 15:03 UTC Modified: 2015-05-28 12:48 UTC
Avg. Score:1.8 ± 1.0
Reproduced:1 of 3 (33.3%)
Same Version:2 (200.0%)
Same OS:2 (200.0%)
From: moxley at inetarena dot com Assigned: kalle (profile)
Status: Closed Package: Mail related
PHP Version: Any version OS: win32 only
Private report: No CVE-ID: None
 [2000-10-06 15:03 UTC] moxley at inetarena dot com
code that fails:
mail("Greg Kempster <>", "theSubject",
"theBody", "From: me <>");

php.ini at mail portion:
[mail function]
		=			;for win32 only
;for win32 only
					;for unix only, may supply arguments as well (default is
'sendmail -t -i')

This works:
mail("", "theSubject", "theBody", "From:
me <>");


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-01-12 07:55 UTC]
confirmed on NT 5 / Apache / CGI from today's CVS.

mail( '"CYNIC" <>' , 'subject' , 'body body body' ) ;

(it doesn't matter whether the name is quoted or not)


Hi. This is the qmail-send program at
I'm afraid I wasn't able to deliver your message to the following addresses.
This is a permanent error; I've given up. Sorry it didn't work out.

<CYNIC <>:
Sorry, no mailbox here by that name. (#5.1.1)

--- Below this line is a copy of the message.

Return-Path: <>
Received: (qmail 28535 invoked from network); 12 Jan 2001 12:53:15 -0000
Received: from unknown (HELO (
  by with SMTP; 12 Jan 2001 12:53:15 -0000
Received: (qmail 29436 invoked by uid 202); 12 Jan 2001 12:52:37 -0000
Received: from unknown (HELO zvahlav) (
  by with SMTP; 12 Jan 2001 12:52:37 -0000
Date: Fri, 12 Jan 2001 13:57:38 -0100
Subject: subject
To: "CYNIC" <>

body body body
 [2001-02-01 15:02 UTC]
Try this as a work around:

     "My Subject",
     "My Body",
     "To: \"Some User\" <>\nFrom: me <>"

 [2001-06-22 18:27 UTC]
windows mail code needs a rewrite
 [2010-11-19 00:14 UTC]
-Package: Feature/Change Request +Package: Mail related -Operating System: Any windows +Operating System: win32 only
 [2011-03-17 17:54 UTC] anrdaemon at freemail dot ru
The ciode you're trying *should* fail.
"to" argument is not a header "To:" field value, but a mail envelope RCPT-TO parameter. Which does not expect anything but email address(es).
 [2015-05-28 12:48 UTC]
-Status: Assigned +Status: Closed -Assigned To: hholzgra +Assigned To: kalle
 [2015-05-28 12:48 UTC]
I'm sorry for the long wait, I hope you are still with us, but as of PHP7 this bug is no longer present, possible also in much much older versions.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Thu Oct 21 02:03:33 2021 UTC