[Koha-bugs] [Bug 1993] Task Scheduler Needs Re-write
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Thu Aug 22 09:30:00 CEST 2013
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=1993
Nicholas van Oudtshoorn <vanoudt at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |vanoudt at gmail.com
--- Comment #38 from Nicholas van Oudtshoorn <vanoudt at gmail.com> ---
Hopefully this is the right bug to write about this in. Just noticed that
runreport.pl (which I'm calling manually from a cron job), whilst allowing for
a format of html, doesn't set the "Content-Type" on such emails to "text/html".
A simple patch replaces:
if ($email){
my %mail = (
To => $to,
From => $from,
Subject => encode('utf8', $subject ),
Message => encode('utf8', $message )
);
sendmail(%mail) or carp 'mail not sent:' . $Mail::Sendmail::error;
} else {
print $message;
}
with
if ($email){
my %mail;
if ($format eq 'html') {
$message = "<html><head><style>tr:nth-child(n+1) {
background-color: #ccc;}</style></head><body>$message</body></html>";
%mail = (
To => $to,
From => $from,
'Content-Type' => 'text/html',
Subject => encode('utf8', $subject ),
Message => encode('utf8', $message )
);
} else {
%mail = (
To => $to,
From => $from,
Subject => encode('utf8', $subject ),
Message => encode('utf8', $message )
);
}
sendmail(%mail) or carp 'mail not sent:' . $Mail::Sendmail::error;
} else {
print $message;
}
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are watching all bug changes.
More information about the Koha-bugs
mailing list