Fixing a hardcoded email address, changing to use the KohaAdminEmailAddress sys pref
authorChris Cormack <crc@liblime.com>
Mon, 5 Nov 2007 22:38:59 +0000 (16:38 -0600)
committerJoshua Ferraro <jmf@liblime.com>
Tue, 6 Nov 2007 12:26:38 +0000 (06:26 -0600)
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
tools/runreport.pl

index 412d806..d2d85a2 100755 (executable)
@@ -2,6 +2,7 @@
 
 # fix this line
 use C4::Reports;
+use C4::Context;
 
 use Mail::Sendmail;
 
@@ -21,7 +22,7 @@ if ($format eq 'url'){
 if ($email){
        my $to      = $email;
        # should be koha admin email
-    my $from    = 'crc@liblime.com';
+    my $from    = C4::Context->preference('KohaAdminEmailAddress');
     my $subject = 'Automated job run';
     my %mail    = (
                        To      => $to,