https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41965
--- Comment #1 from Hammat wele <[email protected]> --- Created attachment 194400 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=194400&action=edit Bug 41965: Mismatch between SMTP server and FROM branch in multi-branch notice sending In a multi-branch setup, when sending notices (e.g., overdue notices), the From address may correctly correspond to the branch where the checkout occurred, but the SMTP server used to send the email is taken from another branch (often the patron’s home library or the system default). This leads to email delivery failures. SMTP and From must always be derived from the same logical branch. To Reproduce You must have: 1- A default SMTP server defined in koha-conf.xml: <smtp_server> <host>smtp.gmail.com</host> <port>587</port> <timeout>5</timeout> <ssl_mode>STARTTLS</ssl_mode> <user_name>[email protected]</user_name> <password>ertyuytre</password> <debug>1</debug> </smtp_server> 2- A second SMTP server configured in Koha. Configuration Steps 1- Go to Administration -> SMTP servers 2- Create a new SMTP server named Midway 3- Go to Administration -> Libraries 4- Edit Springfield 1- Email: [email protected] 2- SMTP server: Default 5- Edit Midway 1- Email: [email protected] 2- SMTP server: Midway 6- Click your username -> Set library -> switch to Midway 7- Find a borrower belonging to Springfield and ensure they have an email 8- Find a record with items 9- Checkout an item to that borrower with a past due date 10- Run: ./misc/cronjobs/overdue_notices.pl 11- Check message_queue table ==> from_address = [email protected] 12- Run: ./misc/cronjobs/process_message_queue.pl -v ==> The SMTP used is the Default one, Expected: Midway SMTP ==> The SMTP server used must correspond to the branch that owns the from_address. 13- Apply the patch 14- Run prove t/db_dependent/Letters.t ==> Test should pass 15- Repeat step 12 ==> The smtp used is the Midway one -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
