[wp-trac] [WordPress Trac] #30128: Allow to use associative arrays beside indexed arrays in wp_mail $headers

WordPress Trac noreply at wordpress.org
Mon Sep 22 17:05:02 UTC 2025


#30128: Allow to use associative arrays beside indexed arrays in wp_mail $headers
-------------------------------------------------+-------------------------
 Reporter:  marsjaninzmarsa                      |       Owner:  (none)
     Type:  enhancement                          |      Status:  new
 Priority:  normal                               |   Milestone:  Future
                                                 |  Release
Component:  Mail                                 |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch has-unit-tests has-test-   |     Focuses:
  info needs-testing                             |
-------------------------------------------------+-------------------------

Comment (by sajjad67):

 == Test Report
 === Description
 This report validates whether the indicated patch works as expected.

 Patch tested: https://github.com/WordPress/wordpress-develop/pull/9971

 === Environment
 - WordPress: 6.9-alpha-60093-src
 - PHP: 8.2.29
 - Server: nginx/1.29.1
 - Database: mysqli (Server: 8.4.6 / Client: mysqlnd 8.2.29)
 - Browser: Chrome 140.0.0.0
 - OS: Windows 10/11
 - Theme: Twenty Twenty-Five 1.3
 - MU Plugins: None activated
 - Plugins:
   * Email Testing 1.0.0
   * Test Reports 1.2.0

 === Actual Results
 1.  ✅ Issue resolved with patch.

 === Before Patch
 {{{
   Return-Path: <from at example.com>
   Received: from localhost (wordpress-develop-php-1.wordpress-
 develop_wpdevnet. [172.18.0.3])
           by 27db0e562ef1 (Mailpit) with SMTP
           for <test at example.com>; Mon, 22 Sep 2025 16:50:05 +0000 (UTC)
   Date: Mon, 22 Sep 2025 16:50:05 +0000
   To: test at example.com
   From: WordPress <from at example.com>
   Subject: Test Subject
   Message-ID: <Lws9sTYCYPmMZJdB58Uxv380VoEZOfQtCCeGfYO4 at localhost>
   X-Mailer: PHPMailer 6.10.0 (https://github.com/PHPMailer/PHPMailer)
   X-Test: two
   MIME-Version: 1.0
   Content-Type: text/plain; charset=UTF-8

   Testing headers
 }}}

 === After Patch
 {{{
   Bcc: hidden1 at example.com, hidden2 at example.com
   Return-Path: <sender at example.com>
   Received: from localhost (wordpress-develop-php-1.wordpress-
 develop_wpdevnet. [172.18.0.3])
           by 27db0e562ef1 (Mailpit) with SMTP
           for <test at example.com>; Mon, 22 Sep 2025 16:58:58 +0000 (UTC)
   Date: Mon, 22 Sep 2025 16:58:58 +0000
   To: test at example.com
   From: WordPress <sender at example.com>
   Cc: cc1 at example.com, cc2 at example.com
   Reply-To: reply1 at example.com, reply2 at example.com
   Subject: Test Subject
   Message-ID: <mvWwx9qTw902pxelEy4TxkQ702mjwWt9QC46V5DFhw at localhost>
   X-Mailer: PHPMailer 6.10.0 (https://github.com/PHPMailer/PHPMailer)
   X-Test: one
   X-Test: two
   MIME-Version: 1.0
   Content-Type: text/plain; charset=UTF-8

   Testing headers
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/30128#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list