Bug 41813

Summary: ILLDefaultStaffEmail should not be used as the sender address
Product: Koha Reporter: Lari Taskula <lari.taskula>
Component: ILLAssignee: Bugs List <koha-bugs>
Status: Needs Signoff --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: lisette, pedro.amorim, tomascohen
Version: unspecified   
Hardware: All   
OS: All   
GIT URL: Initiative type: ---
Sponsorship status: --- Comma delimited list of Sponsors:
Crowdfunding goal: 0 Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 41813: Use library's From-address for ILL staff notifications
Bug 41813: Use library's From-address for ILL staff notifications

Description Lari Taskula 2026-02-11 07:50:39 UTC
When sending ILL staff notifications, the email "To" and "From" addresses are set equal.

Libraries' sending address may differ from receiving address, so this feature should be using the usual From-address that Koha uses in any other types of email notifications.
Comment 1 Lari Taskula 2026-02-11 09:14:41 UTC
Created attachment 192964 [details] [review]
Bug 41813: Use library's From-address for ILL staff notifications

When sending ILL staff notifications, the email "To" and "From" addresses are set
equal.

Libraries' sending address may differ from receiving address, so this feature
should be using the usual From-address that Koha uses in any other types of email
notifications.

This patch changes ILL staff notifications to use the usual From address.

Before applying this patch, to reproduce:
1. Create the following SQL report

SELECT * FROM message_queue ORDER BY message_id DESC;

2. Enable ILL requests using system preference ILLModule
3. Navigate to Administration > Libraries
4. Make sure "ILL staff email" is empty
5. Make sure "Email" is empty
6. Set system preference ILLDefaultStaffEmail to test@example.org
7. Set system preference KohaAdminEmailAddress to library@example.org
8. Navigate to OPAC
9. Create a new ILL request from OPAC
10. Run your SQL report from step 1
11. Observe first row column from_address as test@example.org

It should be library@example.org instead

Apply this patch

To test:
1. Unless you already didn't, create the following SQL report

SELECT * FROM message_queue ORDER BY message_id DESC;

2. Enable ILL requests using system preference ILLModule
3. Navigate to Administration > Libraries
4. Make sure "ILL staff email" is empty
5. Make sure "Email" is empty
6. Set system preference ILLDefaultStaffEmail to test@example.org
7. Set system preference KohaAdminEmailAddress to library@example.org
8. Navigate to OPAC
9. Create a new ILL request from OPAC
10. Run your SQL report from step 1
11. Observe first row column from_address as library@example.org
Comment 2 Lari Taskula 2026-02-11 09:17:06 UTC
Created attachment 192965 [details] [review]
Bug 41813: Use library's From-address for ILL staff notifications

When sending ILL staff notifications, the email "To" and "From" addresses are set
equal.

Libraries' sending address may differ from receiving address, so this feature
should be using the usual From-address that Koha uses in any other types of email
notifications.

This patch changes ILL staff notifications to use the usual From address.

Before applying this patch, to reproduce:
1. Create the following SQL report

SELECT * FROM message_queue ORDER BY message_id DESC;

2. Enable ILL requests using system preference ILLModule
3. Navigate to Administration > Libraries
4. Make sure "ILL staff email" is empty
5. Make sure "Email" is empty
6. Set system preference ILLDefaultStaffEmail to test@example.org
7. Set system preference KohaAdminEmailAddress to library@example.org
8. Set system preference ILLSendStaffNotices to
ILL_REQUEST_CANCEL|ILL_REQUEST_MODIFIED|ILL_PICKUP_READY|ILL_PARTNER_REQ|ILL_REQUEST_UNAVAIL|ILL_REQUEST_UPDATE|ILL_REQ_CREATED
9. Navigate to OPAC
10. Create a new ILL request from OPAC
11. Run your SQL report from step 1
12. Observe first row column from_address as test@example.org

It should be library@example.org instead

Apply this patch

To test:
1. Unless you already didn't, create the following SQL report

SELECT * FROM message_queue ORDER BY message_id DESC;

2. Enable ILL requests using system preference ILLModule
3. Navigate to Administration > Libraries
4. Make sure "ILL staff email" is empty
5. Make sure "Email" is empty
6. Set system preference ILLDefaultStaffEmail to test@example.org
7. Set system preference KohaAdminEmailAddress to library@example.org
8. Set system preference ILLSendStaffNotices to
ILL_REQUEST_CANCEL|ILL_REQUEST_MODIFIED|ILL_PICKUP_READY|ILL_PARTNER_REQ|ILL_REQUEST_UNAVAIL|ILL_REQUEST_UPDATE|ILL_REQ_CREATED
9. Navigate to OPAC
10. Create a new ILL request from OPAC
11. Run your SQL report from step 1
12. Observe first row column from_address as library@example.org