Bug 31281: Use correct reply-to email when sending overdue mails
authorKatrin Fischer <katrin.fischer.83@web.de>
Sun, 7 Aug 2022 16:14:37 +0000 (16:14 +0000)
committerTomas Cohen Arazi <tomascohen@theke.io>
Tue, 16 Aug 2022 12:11:14 +0000 (09:11 -0300)
commit18b2389de49b5c403f7bd68ef315b044a201eff5
tree4ae5acf9c53c5b49ff754933ab9798db0d6f5758
parent10ced3c49485aa5cdfc0cd06cfff30ddb7f9afe7
Bug 31281: Use correct reply-to email when sending overdue mails

Overdue emails are either sent from the issuing or the home
library of an item. We never use the patron's home library,
so the reply-to address must explicitly be set in EnqueueLetter.

To test:
- Set up 2 branches (A and B) with different email addresses.
- Set up an SMTP server for each to use
- Set up an overdue notice trigger for the patron category you'll use
  First letter: 1 day delay, any notice
- Check out an item with home branch B to a patron from A
- Run the the script with:
  overdue_notices.pl -t --frombranch item-homebranch
  overdue_notices.pl -t --frombranch item-issuebranch
- Confirm for each setting that the correct email headers have been
  used. You can see the reply-to address and to-address in the
  message queue:
  SELECT * FROM message_queue;

Signed-off-by: Nason Bimbe <nason.bimbe@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
misc/cronjobs/overdue_notices.pl