Lua primitives: from()
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.
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
This function has been available since version 0.07.