Req #65680 [Opn->Csd]: imap_headerinfo: Value of reply_toaddress when reply-to is empty in mail header
| From: | cmb@php.net | Date: | Fri, 16 Oct 2020 15:27:56 +0000 |
| Subject: | Req #65680 [Opn->Csd]: imap_headerinfo: Value of reply_toaddress when reply-to is empty in mail header | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-229672@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=65680&edit=1
ID: 65680
Updated by: cmb@php.net
Reported by: walter at x5 dot nu
Summary: imap_headerinfo: Value of reply_toaddress when
reply-to is empty in mail header
-Status: Open
+Status: Closed
Type: Feature/Change Request
Package: IMAP related
Operating System: Linux
PHP Version: Irrelevant
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
The reply_toaddress field is provided by libc-client; there is
nothing we can do about it.
Previous Comments:
------------------------------------------------------------------------
[2013-09-16 14:06:36] walter at x5 dot nu
Description:
------------
PHP5.3.3-7
Debian 6.0
If the email header does not contain a reply-to field, then the function imap_headerinfo() returns
the value of the email header field 'Return-Path' instead of an empty string in the field
[reply_toaddress]
Example:
This is the relevant header info of the mail in the inbox
From x@example.com Mon Sep 16 15:42:06 2013
Return-Path: <x@example.com>
X-Original-To: y@example.com
Delivered-To: y@example.com
X-IMP-FROM: _________<x@example.com>
X-IMP-AUTH_USERNAME: <x@example.com>
X-Original-IP: 12.34.56.78
Message-ID: <52370AA4.7050108@example.com>
Date: Mon, 16 Sep 2013 15:41:56 +0200
From: x <x@example.com>
User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130803 Thunderbird/17.0.8
MIME-Version: 1.0
To: y@example.com
Subject: Test
X-Enigmail-Version: 1.4.6
Content-Type: multipart/mixed;
boundary="------------020508080209090708030903"
This is a multi-part message in MIME format.
--------------020508080209090708030903
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
...
Using the PHP function
$headerInfo = imap_headerinfo($mbox, $overview->msgno); print_r($headerInfo);
results in:
stdClass Object
(
[date] => Mon, 16 Sep 2013 15:41:56 +0200
[Date] => Mon, 16 Sep 2013 15:41:56 +0200
[subject] => Test
[Subject] => Test
[message_id] => <52370AA4.7050108@example.com>
[toaddress] => y@example.com
[to] => Array
(
[0] => stdClass Object
(
[mailbox] => y
[host] => example.com
)
)
[fromaddress] => x <x@example.com>
[from] => Array
(
[0] => stdClass Object
(
[personal] => x
[mailbox] => x
[host] => example.com
)
)
[reply_toaddress] => x <x@example.com>
[reply_to] => Array
(
[0] => stdClass Object
(
[personal] => x
[mailbox] => x
[host] => example.com
)
)
[senderaddress] => x <x@example.com>
[sender] => Array
(
[0] => stdClass Object
(
[personal] => x
[mailbox] => x
[host] => example.com
)
)
[Recent] => N
[Unseen] =>
[Flagged] =>
[Answered] =>
[Deleted] =>
[Draft] =>
[Msgno] => 1
[MailDate] => 16-Sep-2013 15:41:56 +0200
[Size] => 24400
[udate] => 1379338916
)
Test script:
---------------
Sent an email without reply to header to target server
On target server used:
$headerInfo = imap_headerinfo($mbox, $overview->msgno); print_r($headerInfo);
As a result
$headerInfo->reply_toaddress is not empty, but contains value of 'Return-Path' from
email header
Expected result:
----------------
In the above example I would expect an empty string in $headerInfo->reply_toaddress
Actual result:
--------------
$headerInfo->reply_toaddress contains the value of 'Return-Path' from the email header
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=65680&edit=1