10 my ($report,$format,$email) = @ARGV;
12 my ($sql,$type) = get_saved_report
($report);
13 my $results = execute_query
($sql,$type,$format,$report);
15 if ($format eq 'text'){
16 $message="<table>$results</table>";
18 if ($format eq 'url'){
24 # should be koha admin email
25 my $from = C4
::Context
->preference('KohaAdminEmailAddress');
26 my $subject = 'Automated job run';
35 if (not(sendmail
%mail)) {