Bug 28817 - It should be possible to configure the reply_address for various notices
Summary: It should be possible to configure the reply_address for various notices
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Notices (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-08-05 16:07 UTC by Nick Clemens (kidclamp)
Modified: 2022-02-28 16:52 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens (kidclamp) 2021-08-05 16:07:58 UTC
Currently except for messages originating from the patron we do not set a reply_address when enqueuing letters,

git grep reply_address

If no reply address is specified when we are sending the messages we use the patron's library's address:
1325 sub _send_message_by_email {
...
1363     if ($patron) {
1364         $library           = $patron->library;
1365         $branch_email      = $library->from_email_address;
1366         $branch_replyto    = $library->branchreplyto;
1367         $branch_returnpath = $library->branchreturnpath;
1368     }
...
1393             reply_to => $message->{'reply_address'} || $branch_replyto,


This means that when an overdue is sent by the issuing library, replies go to the patron's branch
Comment 1 Jonathan Druart 2021-08-06 09:48:29 UTC
Do you mean when editing a notice template?
Comment 2 Nick Clemens (kidclamp) 2021-08-06 09:53:26 UTC
(In reply to Jonathan Druart from comment #1)
> Do you mean when editing a notice template?

That would be interesting, I was thinking a system preference for using the patron library, or the notice branch as the default.

Or adding an option to scripts that generate notices, i.e.:

perl misc/cronjobs/overdue_notices.pl --reply_to item-homebranch
Comment 3 Katrin Fischer 2021-08-07 13:18:23 UTC
Maybe we should consider the overdues one as a bug first?

I think we should match the reply to to the address we are sending the notice from in this case and possible others as a default.

I believe using a pref would not work for all notices. For example DUEDGST are always sent from the patron's library and can contain information about issues from multiple libraries, so any other setting makes no sense.

I am also not sure we can fit a general solution in the notices tool well - maybe we should look at some more use cases first to see where we are going there. But I think fixing the overdues bug first would be most important.
Comment 4 Christopher Brannon 2021-08-12 15:36:43 UTC
(In reply to Katrin Fischer from comment #3)
> Maybe we should consider the overdues one as a bug first?
> 
> I think we should match the reply to to the address we are sending the
> notice from in this case and possible others as a default.
> 
> I believe using a pref would not work for all notices. For example DUEDGST
> are always sent from the patron's library and can contain information about
> issues from multiple libraries, so any other setting makes no sense.
> 
> I am also not sure we can fit a general solution in the notices tool well -
> maybe we should look at some more use cases first to see where we are going
> there. But I think fixing the overdues bug first would be most important.

I think in cases where a digest is used, if notices are coming from only one library, then it could default to what the other notices are set to use for the reply to address.  However, if it is a mix of libraries, then perhaps it could be preference options of A) patron home branch, B) first library in the list, C) the library referenced the most, or D) use a noreply@patronhomebranchdomain.com address (where the patronhomebranchdomain.com is actually their home branch's domain).
Comment 5 Christopher Brannon 2022-02-17 20:56:56 UTC
Just nudging this bug a little.  I'll bring it to the attention of people in slack so they can add some input.
Comment 6 George Williams (NEKLS) 2022-02-17 21:31:29 UTC
I'd like to see options in the message template.  Something like a series of radio buttons that indicate

Reply to address for this message:

System e-mail address (based on KohaAdminEmailAddress)
System Replyto address (based on  ReplytoDefault)
Transacting library's e-mail address (based on library's Reply-To)
Borrower home library e-mail address (based on library's Reply-To)
Other (with an option to enter an e-mail address)

And there might be some other options I haven't thought of yet.
Comment 7 Christopher Brannon 2022-02-28 16:52:07 UTC
(In reply to George Williams (NEKLS) from comment #6)
> I'd like to see options in the message template.  Something like a series of
> radio buttons that indicate
> 
> Reply to address for this message:
> 
> System e-mail address (based on KohaAdminEmailAddress)
> System Replyto address (based on  ReplytoDefault)
> Transacting library's e-mail address (based on library's Reply-To)
> Borrower home library e-mail address (based on library's Reply-To)
> Other (with an option to enter an e-mail address)
> 
> And there might be some other options I haven't thought of yet.

Should this be an option on each template, or just defaults, or just global?

We should have this set of options for both individual e-mails AND digest e-mails, in my opinion, so I guess to answer my question, it should be on each template.