Generally you can use all POST, GET, SESSION and CONFIG variables.
Set $rcmail_config['skin_include_php'] = TRUE; and create a include file in your "./skins/myskin/includes" folder:
echo "";
print_r($_GET); print_r($_POST); print_r($_SESSION); print_r($CONFIG);
echo "
";
?>
Now if you include this file into a template, you can see what actually is available for this task/action.
In addition there are template objects. The functions for these objects are located in "./program/steps/--task--/func.inc". Look for "$OUTPUT->add_handlers".