From 374343b1f89de5a5471e86be796b675305eeada2 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 inbound_email_address This patch updates the overdue_notices functionality to use the inbound_email_address method to obtain the correct email address for a branch. Signed-off-by: Jonathan Druart --- 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..8b4fd7eb00 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->inbound_email_address; 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