php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #64067 to email address messed up
Submitted: 2013-01-25 08:28 UTC Modified: 2013-01-25 12:06 UTC
From: erikv3 at gmx dot net Assigned:
Status: Not a bug Package: *Mail Related
PHP Version: 5.3.21 OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: erikv3 at gmx dot net
New email:
PHP Version: OS:

 

 [2013-01-25 08:28 UTC] erikv3 at gmx dot net
Description:
------------
---
From manual page: http://www.php.net/function.mail#refsect1-function.mail-
parameters
---



Test script:
---------------
$send_status = mail("test 1:2:3:4:5:6:7:8:9 <erikv2@gmx.net>", "strange name test", "hi");

Expected result:
----------------
an email with in the to field:
test 1:2:3:4:5:6:7:8:9 <erikv2@gmx.net>

Actual result:
--------------
this is the actual to:

test@roadrunner.nedlinux.com,
	"1:2:3:4:5:6:7:8"@roadrunner.nedlinux.com:9 <erikv2@gmx.net>

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-01-25 10:54 UTC] krakjoe@php.net
-Status: Open +Status: Not a bug
 [2013-01-25 10:54 UTC] krakjoe@php.net
This is a result of misuse. 

Please see section 2.2 of the appropriate RFC: 
http://www.faqs.org/rfcs/rfc2822.html
 [2013-01-25 12:03 UTC] erikv3 at gmx dot net
if i understood correct from the rfc:

address can be (a.o.): [display-name] angle-addr
where display-name should be a dot atom, or
if not a dot atom, it should be a quoted string

and thus the call should be:
$send_status = mail('"test 1:2:3:4:5:6:7:8:9" <some@domain.net>', 'strange name 
test', 'hi')
 [2013-01-25 12:06 UTC] erikv3 at gmx dot net
if i understood correct from the rfc:

address can be (a.o.): [display-name] angle-addr
where display-name should be a dot atom, or
if not a dot atom, it should be a quoted string

and thus the call should be:
$send_status = mail('"test 1:2:3:4:5:6:7:8:9" <some@domain.net>', 'strange name 
test', 'hi')

correct?
think so, bec it works.

sorry about registering it as a bug.
i'm using a mailscript and expected it to work properly.
and thus again: expect the unexpected.

thanks, erik
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 03:01:28 2024 UTC