Edit report at http://bugs.php.net/bug.php?id=7068&edit=1
ID: 7068
Comment by: anrdaemon at freemail dot ru
Reported by: moxley at inetarena dot com
Summary: fails when 'to:' argument has the form "Name
<[email protected]>"
Status: Assigned
Type: Feature/Change Request
Package: Mail related
Operating System: win32 only
PHP Version: Any version
Assigned To: hholzgra
Block user comment: N
Private report: N
New Comment:
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).
Previous Comments:
------------------------------------------------------------------------
[2001-06-22 18:27:08] [email protected]
windows mail code needs a rewrite
------------------------------------------------------------------------
[2001-02-01 15:02:49] [email protected]
Try this as a work around:
mail("[email protected]",
"My Subject",
"My Body",
"To: \"Some User\" <[email protected]>\nFrom: me <[email protected]>"
);
Sean
------------------------------------------------------------------------
[2001-01-12 07:55:55] [email protected]
confirmed on NT 5 / Apache / CGI from today's CVS.
mail( '"CYNIC" <[email protected]>' , 'subject' , 'body body body' ) ;
(it doesn't matter whether the name is quoted or not)
result:
-------
Hi. This is the qmail-send program at php.net.
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 <[email protected]>:
Sorry, no mailbox here by that name. (#5.1.1)
--- Below this line is a copy of the message.
Return-Path: <[email protected]>
Received: (qmail 28535 invoked from network); 12 Jan 2001 12:53:15
-0000
Received: from unknown (HELO k0r3.reflektor.cz) (212.24.129.44)
by www.php.net 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) (212.24.139.3)
by k0r3.reflektor.cz with SMTP; 12 Jan 2001 12:52:37 -0000
Date: Fri, 12 Jan 2001 13:57:38 -0100
From: [email protected]
Subject: subject
To: "CYNIC" <[email protected]>
body body body
------------------------------------------------------------------------
[2000-10-06 15:03:20] moxley at inetarena dot com
code that fails:
mail("Greg Kempster <[email protected]>", "theSubject",
"theBody", "From: me <[email protected]>");
php.ini at mail portion:
[mail function]
SMTP
= pop.ptld.uswest.net ;for win32 only
sendmail_from
=
[email protected]
;for win32 only
;sendmail_path
=
;for unix only, may supply arguments as
well (default is
'sendmail -t -i')
Additionally:
This works:
mail("[email protected]", "theSubject", "theBody", "From:
me <[email protected]>");
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=7068&edit=1