Lumail - The console email client


Lua primitives: from()

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

This function is designed to get/set the from-address as used when replying to a message, or composing a new one.

It is expected that a user might configure a default from-address, but then change that depending upon the current folder.

Sample usage:

default_email = "Steve Kemp ";
from( default_email );

--
-- Change the from-address if we're in a personal/work folder.
--
function on_folder_selection( folder )

   if ( string.find( folder, "personal", 1, true )  ) then
      from ("Steve ");
   elseif ( string.find( folder, "work" , 1, true )  ) then
      from("Steve ");
   else
      from( default_email );
   end
end

Availability

This function has been available since version 0.07.

See Also

See also get_variables, on_folder_selection.