|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2020-10-16 15:27 UTC] cmb@php.net
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: cmb
[2020-10-16 15:27 UTC] cmb@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 01 05:00:01 2025 UTC |
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