From db855d9075559910b7421db51a3e9c71412db219 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Tue, 25 Feb 2020 13:20:18 +0000 Subject: [PATCH] Bug 24726: Update overdue_notices to use get_effective_email This patch updates the overdue_notices functionality to use the get_effective_email method to obtain the correct email address for a branch. --- misc/cronjobs/overdue_notices.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/misc/cronjobs/overdue_notices.pl b/misc/cronjobs/overdue_notices.pl index 75fd593c77..a756bcb8a3 100755 --- a/misc/cronjobs/overdue_notices.pl +++ b/misc/cronjobs/overdue_notices.pl @@ -455,6 +455,7 @@ foreach my $branchcode (@branches) { my $library = Koha::Libraries->find($branchcode); my $admin_email_address = $library->branchemail || C4::Context->preference('KohaAdminEmailAddress'); + my $branch_email_address = $library->get_effective_email; my @output_chunks; # may be sent to mail or stdout or csv file. $verbose and warn sprintf "branchcode : '%s' using %s\n", $branchcode, $admin_email_address; @@ -821,7 +822,7 @@ END_SQL borrowernumber => undef, message_transport_type => 'email', attachments => [$attachment], - to_address => $admin_email_address, + to_address => $branch_email_address, } ) unless $test_mode; } -- 2.20.1