@@ -, +, @@ - create a savedsql report - run misc/cronjob/runreport.pl with options --format set to html and --to any email - check plack errors log, you should get a warning - apply patch - repeat runreport.pl step - check plack errors log, no additional warning there should be --- misc/cronjobs/runreport.pl | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) --- a/misc/cronjobs/runreport.pl +++ a/misc/cronjobs/runreport.pl @@ -314,10 +314,7 @@ foreach my $report_id (@ARGV) { } if ($email) { my $args = { to => $to, from => $from, subject => $subject }; - if ( $format eq 'html' ) { - $message = "$message"; - $args->{contenttype} = 'text/html'; - } + my $email = Koha::Email->new(); my %mail = $email->create_message_headers($args); $mail{Data} = $message; @@ -325,6 +322,12 @@ foreach my $report_id (@ARGV) { my $msg = MIME::Lite->new(%mail); + if ( $format eq 'html' ) { + $message = "$message"; + $args->{contenttype} = 'text/html'; + } + $msg-> attr("content-type" => $args->{contenttype}); + $msg->attach( Type => "text/$format", Data => encode( 'utf8', $message ), --