Make WordPress Core

Opened 20 months ago

#56779 new enhancement

wp_mail header ignores multiple headers with same name

Reported by: pentatonicfunk's profile pentatonicfunk Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Mail Keywords:
Focuses: Cc:


Snippet wp_mail

    // Add it to our grand headers array.
    $headers[ trim( $name ) ] = trim( $content );

Passing headers this way:

$headers[] = 'x-my-things: thing1';
$headers[] = 'x-my-things: thing2';

Will resulting headers only generated one ( the last one )

$headers['x-my-things'] = 'thing2';

Expectation, it should retain the headers index, should behave similarly with phpmaailer::addCustomHeader, headers indexed by numeric, and each item contains name and value.

Example use case Mailgun x-mailgun-tag,

Change History (0)

Note: See TracTickets for help on using tickets.