[Mailmunge] Fetching all Headers.

Dianne Skoll dianne at skollsoft.com
Mon Nov 11 21:29:44 EST 2024


On Mon, 11 Nov 2024 21:24:23 -0500
list--- via Mailmunge <mailmunge at lists.mailmunge.org> wrote:

> > I'm not sure what problem you're trying to solve.  MIME::Head let's
> > you get any header just as pulling it out of a hash would.

> End goal is having %headers i can loop and match filters to, without
> knowing the names of what the headers will be.

MIME::Head is a subclass of Mail::Header, so:

    my (@headers) = $ctx->mime_entity->head->tags;

should get you what you need.  It returns an array of header names
(like "From", "Subject", etc.)

Regards,

Dianne.


More information about the Mailmunge mailing list