php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #10182 mail() $to parameter doesn't accept rfc822 style addresses
Submitted: 2001-04-05 09:46 UTC Modified: 2005-09-02 07:30 UTC
Votes:8
Avg. Score:4.8 ± 0.4
Reproduced:6 of 7 (85.7%)
Same Version:4 (66.7%)
Same OS:5 (83.3%)
From: apere at agilitime dot com Assigned:
Status: Not a bug Package: Mail related
PHP Version: 3CVS OS: Any Windows
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: apere at agilitime dot com
New email:
PHP Version: OS:

 

 [2001-04-05 09:46 UTC] apere at agilitime dot com
Ok, I have found several notes telling that the following syntax works :

$to = "\"Arnaud PERE\" <apere@agilitime.com>";
mail ($to,"subject","message");

But when I try this, my SMTP server says :
(bad host/domain syntax: "agilitime.com>")

see the trailing ">"...

Instead, I tried the following syntax which appeared to work :

$to = "apere@agilitime.com (Arnaud PERE)";
mail ($to,"subject","message");

This problem does not appear on the Unix version of PHP4.04pl1, but only on the windows version.

Did I do something wrong ?

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-06-22 18:47 UTC] hholzgra@php.net
windows mail code *badly* needs a rewirte
 [2002-06-02 11:15 UTC] mfischer@php.net
Updated summary, Version, Status, OS
 [2002-07-12 05:37 UTC] david at acz dot org
Why does it have to be Windows only?  I would *really* like to see integrated SMTP support in PHP on UNIX platforms.  Keeping it Windows only seems silly.  Yes, I know it's easy to code SMTP stuff in PHP, but as long as the code is there...
 [2002-07-12 05:44 UTC] hholzgra@php.net
for now it will stay windows only at least as long
as we are not perfectily sure that the new code 
realy works

there is no use in replacing a working solution 
with stuff still marked as experimental 

(although mfisher did a lot of good work on it lately
 that improved the situation on windows quite a bit :)
 [2002-07-12 06:01 UTC] mfischer@php.net
thx :)

to david: if you need that kind of feature maybe you should use the existing mail classes which support (e)smtp (there's one on pear.php.net and one on phpclasses.upperdesign.com )
 [2002-08-07 02:52 UTC] mbretter at jawa dot at
the problem is, that the mail command itself adds < and > at the beginning and at the end of to-e-mail adress. if you have $to = '<mbretter@jawa.at>';

then implicit you have <<mbretter@inode.at>> and some mailservers don't like this.
 [2005-09-02 07:30 UTC] sniper@php.net
There's already other report about this. (clearing out old reports forgotten due to a bug in bug system :)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 16:01:28 2024 UTC