Note that IsAvailableForItemLevelRequest() does not
check if the staff operator is authorized to place
a request on the item - in particular,
-this routine does not check IndependantBranches
+this routine does not check IndependentBranches
and canreservefromotherbranches.
=cut
my $borrower = C4::Members::GetMember(borrowernumber => $borrowernumber);
# Try to get the borrower's email address
- my $to_address;
- my $which_address = C4::Context->preference('AutoEmailPrimaryAddress');
- # If the system preference is set to 'first valid' (value == OFF), look up email address
- if ($which_address eq 'OFF') {
- $to_address = C4::Members::GetFirstValidEmailAddress( $borrowernumber );
- } else {
- $to_address = $borrower->{$which_address};
- }
+ my $to_address = C4::Members::GetNoticeEmailAddress($borrowernumber);
my $letter_code;
my $print_mode = 0;