Lumail - The console email client


Lua primitives: all_headers()

NOTE: Lumail-legacy has been superseded by Lumail 2.x, which has a wholly unified Lua API.

This function will return a table containing all the headers from within the current message.

It could be used to dump all headers like so:

ff = io.open( "/tmp/headers.log", "a")

table = all_headers()

for header,value in pairs( table ) do
   ff:write( header .. ":" .. value .. "\n" )
end

ff:close()

Because all headers are returned in a table the following two statements should be equivalent:

msg(header( "Subject" ) );

And:

msg(all_headers()["Subject"]);

Availability

This function has been available since version 0.21.

See Also

See also body, header.