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

(-)a/Koha/Patron/Password/Recovery.pm (-6 / +5 lines)
Lines 153-159 sub SendPasswordRecoveryEmail { Link Here
153
    my $library = $borrower->library;
153
    my $library = $borrower->library;
154
    my $kohaEmail = $library->branchemail || C4::Context->preference('KohaAdminEmailAddress');  # send from patron's branch or Koha Admin
154
    my $kohaEmail = $library->branchemail || C4::Context->preference('KohaAdminEmailAddress');  # send from patron's branch or Koha Admin
155
155
156
    C4::Letters::EnqueueLetter(
156
    my $message_id = C4::Letters::EnqueueLetter(
157
        {
157
        {
158
            letter                 => $letter,
158
            letter                 => $letter,
159
            borrowernumber         => $borrower->borrowernumber,
159
            borrowernumber         => $borrower->borrowernumber,
Lines 162-171 sub SendPasswordRecoveryEmail { Link Here
162
            message_transport_type => 'email',
162
            message_transport_type => 'email',
163
        }
163
        }
164
    );
164
    );
165
    my $num_letters_attempted = C4::Letters::SendQueuedMessages( {
165
166
        borrowernumber => $borrower->borrowernumber,
166
    my $num_letters_attempted =
167
        letter_code => 'PASSWORD_RESET'
167
      C4::Letters::SendQueuedMessages( { message_id => $message_id } );
168
    } );
168
169
    return ($num_letters_attempted > 0);
169
    return ($num_letters_attempted > 0);
170
}
170
}
171
171
172
- 

Return to bug 27860