Lumail - The console email client


Lua primitives: attachments()

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

This function will return a table containing the names of any attachments in the currently selected mesage.

For example:

a = attachments();

-- for each attachment
for index,name in ipairs( a ) do
    -- Save it into /tmp with the same name
    save_attachment( i, "/tmp/" .. name );
end

Availability

This function has been available since version 0.10.

See Also

See also attachment_colour, count_attachments, save_attachment.