Bug 5544: prefer library email address over admin address as notice sender
authorKyle M Hall <kyle@bywatersolutions.com>
Wed, 9 May 2012 16:47:19 +0000 (12:47 -0400)
committerGalen Charlton <gmc@esilibrary.com>
Fri, 4 Oct 2013 16:06:04 +0000 (16:06 +0000)
commit280416929acc1bf16567f5dcdf33cc8e182a9cd9
treed658507713cf646fe3ed7893dbbddf5b38ef59fb
parent117f8a5ccc592631396ceacbf13d208528f59f51
Bug 5544: prefer library email address over admin address as notice sender

Right now overdues come from the branch, but the
others come from the admin email address - this
is a problem in multi-branch systems because they
have to come up with one email address that all
branches have access to.

C4::Letters::_send_message_by_email currently sets
the from address in the following order:
1) Address specified in message
2) Koha admin email address

The order will now be:
1) Address specified in message
2) Borrower's home library email address
3) Koha admin email address

Test Plan:
1) Set your library email addresses, and the KohaAdminEmailAddress
   Make sure each of them are unqiue
2) Choose a borrower, enable the enhanced messaging and enable the
   checkout and checkin email notices. Use your email address for
   the borrower's email so you can recieve the emails.
3) Check out an item, check the from address of the email,
   it should be the email addres set in KohaAdminEmailAddress
4) Apply the patch
5) Return the item, check the from address of the email,
   it should match the email address set for the borrower's
   home library.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
C4/Letters.pm