Skip to content

Issue #700: Automatically expose all custom headers#756

Merged
Sebbo94BY merged 1 commit into
6.xfrom
Automatically-expose-all-custom-headers
May 10, 2026
Merged

Issue #700: Automatically expose all custom headers#756
Sebbo94BY merged 1 commit into
6.xfrom
Automatically-expose-all-custom-headers

Conversation

@Sebbo94BY
Copy link
Copy Markdown
Collaborator

@Sebbo94BY Sebbo94BY commented May 10, 2026

IncomingMailHeader now parses the raw header block into a generic headersByName map and exposes case-insensitive lookup helpers: setHeadersRaw(), getHeader(), getHeaders(), and getAllHeaders() in src/PhpImap/IncomingMailHeader.php:47. Mailbox::getMailHeader() now always populates that map via setHeadersRaw(), so every fetched mail/header gets arbitrary custom headers automatically in src/PhpImap/Mailbox.php:1292. The stored keys are normalized to lowercase, so getHeader('Origin-MessageID') and getHeader('origin-messageid') behave the same.

Solves #700

`IncomingMailHeader` now parses the raw header block into a generic
`headersByName` map and exposes case-insensitive lookup helpers:
`setHeadersRaw()`, `getHeader()`, `getHeaders()`, and `getAllHeaders()` in
`src/PhpImap/IncomingMailHeader.php:47`. `Mailbox::getMailHeader()` now always
populates that map via `setHeadersRaw()`, so every fetched mail/header gets
arbitrary custom headers automatically in `src/PhpImap/Mailbox.php:1292`. The
stored keys are normalized to lowercase, so `getHeader('Origin-MessageID')` and
`getHeader('origin-messageid')` behave the same.
@Sebbo94BY Sebbo94BY merged commit f16c7a4 into 6.x May 10, 2026
0 of 9 checks passed
@Sebbo94BY Sebbo94BY deleted the Automatically-expose-all-custom-headers branch May 10, 2026 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant