View | Details | Raw Unified | Return to bug 28581
Collapse All | Expand All

(-)a/C4/Reserves.pm (-1 / +1 lines)
Lines 1849-1855 sub _koha_notify_reserve { Link Here
1849
1849
1850
    my $library = Koha::Libraries->find( $hold->branchcode )->unblessed;
1850
    my $library = Koha::Libraries->find( $hold->branchcode )->unblessed;
1851
1851
1852
    my $admin_email_address = $library->{branchemail} || C4::Context->preference('KohaAdminEmailAddress');
1852
    my $admin_email_address = $library->from_email_address;
1853
1853
1854
    my %letter_params = (
1854
    my %letter_params = (
1855
        module => 'reserves',
1855
        module => 'reserves',
(-)a/Koha/Illrequest.pm (-2 / +2 lines)
Lines 1335-1341 sub generic_confirm { Link Here
1335
            "No target email addresses found. Either select at least one partner or check your ILL partner library records.")
1335
            "No target email addresses found. Either select at least one partner or check your ILL partner library records.")
1336
          if ( !$to );
1336
          if ( !$to );
1337
        # Create the from, replyto and sender headers
1337
        # Create the from, replyto and sender headers
1338
        my $from = $branch->branchemail;
1338
        my $from = $branch->from_email_address;
1339
        my $replyto = $branch->inbound_ill_address;
1339
        my $replyto = $branch->inbound_ill_address;
1340
        Koha::Exceptions::Ill::NoLibraryEmail->throw(
1340
        Koha::Exceptions::Ill::NoLibraryEmail->throw(
1341
            "Your library has no usable email address. Please set it.")
1341
            "Your library has no usable email address. Please set it.")
Lines 1427-1433 sub send_patron_notice { Link Here
1427
    # Notice should come from the library where the request was placed,
1427
    # Notice should come from the library where the request was placed,
1428
    # not the patrons home library
1428
    # not the patrons home library
1429
    my $branch = Koha::Libraries->find($self->branchcode);
1429
    my $branch = Koha::Libraries->find($self->branchcode);
1430
    my $from_address = $branch->branchemail;
1430
    my $from_address = $branch->from_email_address;
1431
    my $reply_address = $branch->inbound_ill_address;
1431
    my $reply_address = $branch->inbound_ill_address;
1432
1432
1433
    # Send the notice to the patron via the chosen transport methods
1433
    # Send the notice to the patron via the chosen transport methods
(-)a/circ/pendingreserves.pl (-2 / +2 lines)
Lines 86-98 if ( $op eq 'cancel_reserve' and $reserve_id ) { Link Here
86
                },
86
                },
87
            );
87
            );
88
            if ( $letter ) {
88
            if ( $letter ) {
89
                my $admin_email_address = $library->branchemail || C4::Context->preference('KohaAdminEmailAddress');
89
                my $from_address = $library->from_email_address;
90
90
91
                C4::Letters::EnqueueLetter(
91
                C4::Letters::EnqueueLetter(
92
                    {   letter                 => $letter,
92
                    {   letter                 => $letter,
93
                        borrowernumber         => $patron->borrowernumber,
93
                        borrowernumber         => $patron->borrowernumber,
94
                        message_transport_type => 'email',
94
                        message_transport_type => 'email',
95
                        from_address           => $admin_email_address,
95
                        from_address           => $from_address,
96
                    }
96
                    }
97
                );
97
                );
98
                unless ( $patron->notice_email_address ) {
98
                unless ( $patron->notice_email_address ) {
(-)a/misc/cronjobs/notice_unprocessed_suggestions.pl (-5 / +1 lines)
Lines 48-56 for my $number_of_days (@days) { Link Here
48
        my $budget = C4::Budgets::GetBudget( $suggestion->{budgetid} );
48
        my $budget = C4::Budgets::GetBudget( $suggestion->{budgetid} );
49
        my $patron = Koha::Patrons->find( $budget->{budget_owner_id} );
49
        my $patron = Koha::Patrons->find( $budget->{budget_owner_id} );
50
        my $email_address = $patron->notice_email_address;
50
        my $email_address = $patron->notice_email_address;
51
        my $library = $patron->library;
52
        my $admin_email_address = $library->branchemail
53
          || C4::Context->preference('KohaAdminEmailAddress');
54
51
55
        if ($email_address) {
52
        if ($email_address) {
56
            say "Patron " . $patron->borrowernumber . " is going to be notified" if $verbose;
53
            say "Patron " . $patron->borrowernumber . " is going to be notified" if $verbose;
Lines 70-77 for my $number_of_days (@days) { Link Here
70
                    {
67
                    {
71
                        letter                 => $letter,
68
                        letter                 => $letter,
72
                        borrowernumber         => $patron->borrowernumber,
69
                        borrowernumber         => $patron->borrowernumber,
73
                        message_transport_type => 'email',
70
                        message_transport_type => 'email'
74
                        from_address           => $admin_email_address,
75
                    }
71
                    }
76
                );
72
                );
77
            }
73
            }
(-)a/misc/cronjobs/overdue_notices.pl (-2 / +1 lines)
Lines 469-476 foreach my $branchcode (@branches) { Link Here
469
    }
469
    }
470
470
471
    my $library             = Koha::Libraries->find($branchcode);
471
    my $library             = Koha::Libraries->find($branchcode);
472
    my $admin_email_address = $library->branchemail
472
    my $admin_email_address = $library->from_email_address;
473
      || C4::Context->preference('KohaAdminEmailAddress');
474
    my $branch_email_address = C4::Context->preference('AddressForFailedOverdueNotices')
473
    my $branch_email_address = C4::Context->preference('AddressForFailedOverdueNotices')
475
      || $library->inbound_email_address;
474
      || $library->inbound_email_address;
476
    my @output_chunks;    # may be sent to mail or stdout or csv file.
475
    my @output_chunks;    # may be sent to mail or stdout or csv file.
(-)a/suggestion/suggestion.pl (-6 / +1 lines)
Lines 188-196 if ( $op =~ /save/i ) { Link Here
188
                my $patron = Koha::Patrons->find( $suggestion_only->{managedby} );
188
                my $patron = Koha::Patrons->find( $suggestion_only->{managedby} );
189
                my $email_address = $patron->notice_email_address;
189
                my $email_address = $patron->notice_email_address;
190
                if ($patron->notice_email_address) {
190
                if ($patron->notice_email_address) {
191
                    my $library = $patron->library;
192
                    my $admin_email_address = $library->branchemail
193
                      || C4::Context->preference('KohaAdminEmailAddress');
194
191
195
                    my $letter = C4::Letters::GetPreparedLetter(
192
                    my $letter = C4::Letters::GetPreparedLetter(
196
                        module      => 'suggestions',
193
                        module      => 'suggestions',
Lines 207-214 if ( $op =~ /save/i ) { Link Here
207
                        {
204
                        {
208
                            letter                 => $letter,
205
                            letter                 => $letter,
209
                            borrowernumber         => $patron->borrowernumber,
206
                            borrowernumber         => $patron->borrowernumber,
210
                            message_transport_type => 'email',
207
                            message_transport_type => 'email'
211
                            from_address           => $admin_email_address,
212
                        }
208
                        }
213
                    );
209
                    );
214
                }
210
                }
215
- 

Return to bug 28581