Files
kumomta/docs/reference/headermap/iter.md
T
Wez Furlong 1bf9d138ce extended lua mime parsing API
refs: https://github.com/KumoCorp/kumomta/issues/117

Could also make it possible to do eg:
https://github.com/KumoCorp/kumomta/issues/142
without any explicit direct support in the product.
2025-09-09 09:15:58 +01:00

646 B

iter

headers:iter(OPTIONAL_NAME)

{{since('dev')}}

Produces an iterator over the headers. If OPTIONAL_NAME is omitted, all headers are iterated in the order in which they appear in the message. If OPTIONAL_NAME is specified, then all headers that equal the name, case insensitively, will be iterated in the order in which they appear in the message.

Iterating all headers

for hdr in headers:iter() do
  print('got header', hdr.name)
end

Iterating just the authentication results headers

for hdr in headers:iter 'Authentication-Results' do
  print('got auth result', hdr.name, hdr.value)
end