View | Details | Raw Unified | Return to bug 22838
Collapse All | Expand All

(-)a/misc/cronjobs/runreport.pl (-5 / +7 lines)
Lines 314-323 foreach my $report_id (@ARGV) { Link Here
314
    }
314
    }
315
    if ($email) {
315
    if ($email) {
316
        my $args = { to => $to, from => $from, subject => $subject };
316
        my $args = { to => $to, from => $from, subject => $subject };
317
        if ( $format eq 'html' ) {
317
318
            $message = "<html><head><style>tr:nth-child(2n+1) { background-color: #ccc;}</style></head><body>$message</body></html>";
319
            $args->{contenttype} = 'text/html';
320
        }
321
        my $email = Koha::Email->new();
318
        my $email = Koha::Email->new();
322
        my %mail  = $email->create_message_headers($args);
319
        my %mail  = $email->create_message_headers($args);
323
        $mail{Data} = $message;
320
        $mail{Data} = $message;
Lines 325-330 foreach my $report_id (@ARGV) { Link Here
325
322
326
        my $msg = MIME::Lite->new(%mail);
323
        my $msg = MIME::Lite->new(%mail);
327
324
325
        if ( $format eq 'html' ) {
326
            $message = "<html><head><style>tr:nth-child(2n+1) { background-color: #ccc;}</style></head><body>$message</body></html>";
327
            $args->{contenttype} = 'text/html';
328
        }
329
        $msg-> attr("content-type" => $args->{contenttype});
330
328
        $msg->attach(
331
        $msg->attach(
329
            Type        => "text/$format",
332
            Type        => "text/$format",
330
            Data        => encode( 'utf8', $message ),
333
            Data        => encode( 'utf8', $message ),
331
- 

Return to bug 22838