From 73bc0889a39c399cb244fa9120ddd58efa826315 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 26 Dec 2019 13:30:48 +0100 Subject: [PATCH] Bug 22838: Specify a content-type for other formats --- misc/cronjobs/runreport.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/cronjobs/runreport.pl b/misc/cronjobs/runreport.pl index fbea88944a..2d02679cdb 100755 --- a/misc/cronjobs/runreport.pl +++ b/misc/cronjobs/runreport.pl @@ -322,11 +322,11 @@ foreach my $report_id (@ARGV) { my $msg = MIME::Lite->new(%mail); + my $contenttype = "text/$format"; if ( $format eq 'html' ) { $message = "$message"; - $args->{contenttype} = 'text/html'; } - $msg-> attr("content-type" => $args->{contenttype}); + $msg->attr("content-type" => $contenttype); $msg->attach( Type => "text/$format", -- 2.11.0