Bug 18775 - The "Password Reset" notice should use the patron's homebranch's email as "from" address

To test:
1. Enable the password recovery feature.
2. In the OPAC, click on "Forgot you password?" link and enter requested information.
3. The email with the password reset link has the Koha Admin Email Address listed as the sender.
4. Apply the patch.
5. Repeat step 2. The email with the password reset link now has the the "from" address set for the patron's home branch listed as the sender.

Signed-off-by: Jessica Freeman <jessicafreeman@catalyst.net.nz>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
David Kuhn 2017-06-10 13:08:20 -07:00 committed by Jonathan Druart
parent e21d2ac864
commit a0b6bcfd55

View file

@ -148,8 +148,9 @@ sub SendPasswordRecoveryEmail {
{ passwordreseturl => $uuidLink, user => $borrower->userid },
);
# define to/from emails
my $kohaEmail = C4::Context->preference('KohaAdminEmailAddress'); # from
# define from emails
my $library = Koha::Libraries->find( $borrower->branchcode );
my $kohaEmail = $library->branchemail || C4::Context->preference('KohaAdminEmailAddress'); # send from patron's branch or Koha Admin
C4::Letters::EnqueueLetter(
{