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 <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Martin Renvoize 2020-02-25 13:20:18 +00:00
parent 7e1ebe8dde
commit a696d4ecc3
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
1 changed files with 2 additions and 1 deletions

View File

@ -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;
}