The email addresses for 'to' and 'from' are the same for subscription alerts. They both contain the patron's mail address (which is the actual to-adress). Depending on you MTA/SMTP settings, this will cause errors instead of sending emails.
Created attachment 19889 [details] [review] Bug 10621 Subscription alert emails have wrong from-address From-address and to-address were the same (patron's email) for subscription alerts. This patch changes 'from' the branch or kohaadminemailaddress
Created attachment 19890 [details] [review] Bug 10621 Subscription alert emails have wrong from-address From-address and to-address were the same (patron's email) for subscription alerts. This patch changes 'from' the branch or kohaadminemailaddress To test - add a subscription in staff/serials in case you don't have any - enable patron notifications or the subscription - in the OPAC, subscribe to the serial - in staff/serial, receive an issue of the serial Before applying the patch, the email that is supposed to be sent has the patron's email as 'from' and 'to' (and is likely to fail). If you follow the steps after applying the patch, the email alert should have the 'from' address of the patron's branch or kohaadminemiladdress -- which should also work fine with the MTA/SMTP you have set up for messaging.
Created attachment 19923 [details] [review] Bug 10621 Subscription alert emails have wrong from-address From-address and to-address were the same (patron's email) for subscription alerts. This patch changes 'from' the branch or kohaadminemailaddress To test - add a subscription in staff/serials in case you don't have any - enable patron notifications or the subscription - in the OPAC, subscribe to the serial - in staff/serial, receive an issue of the serial Before applying the patch, the email that is supposed to be sent has the patron's email as 'from' and 'to' (and is likely to fail). If you follow the steps after applying the patch, the email alert should have the 'from' address of the patron's branch or kohaadminemiladdress -- which should also work fine with the MTA/SMTP you have set up for messaging. Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
I was following your test plan, but it looks like there is some bug in sending alerts that makes your test plan fail (although it is (far) outside the scope of your report). Just following the code, I note the following: Serials/ModSerialStatus calls Letters/SendAlerts Letters/SendAlerts calls getalert to get a list of email addresses for that subscription. Sub getalert does however look in table alert (it is empty in my case), and does not send anything. Note that the routing list is found in table subscriptionroutinglist (that was not empty for me). So I cannot fail this patch, but the test plan does not work out for me. So I would like to ask patch author and signer: How did you manage to test this? Because we stumble over another bug.. How is it possible that existing code here looks for email addresses in the wrong table?? Thanks.
I realize now that I was not subscribing via opac but via staff. Will have another try :)
(In reply to M. de Rooy from comment #5) > I realize now that I was not subscribing via opac but via staff. Will have > another try :) And of course, that works fine ;) Well, at least learned something more about the code here.
QA Comment: Simple patch. Have been testing this very well :) with lots of arriving issues, and debugging statements.. Looks good to me now. No complaints from koha-qa. Passed QA
Created attachment 19945 [details] [review] Bug 10621 Subscription alert emails have wrong from-address From-address and to-address were the same (patron's email) for subscription alerts. This patch changes 'from' the branch or kohaadminemailaddress To test - add a subscription in staff/serials in case you don't have any - enable patron notifications or the subscription - in the OPAC, subscribe to the serial - in staff/serial, receive an issue of the serial Before applying the patch, the email that is supposed to be sent has the patron's email as 'from' and 'to' (and is likely to fail). If you follow the steps after applying the patch, the email alert should have the 'from' address of the patron's branch or kohaadminemiladdress -- which should also work fine with the MTA/SMTP you have set up for messaging. Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Pushed to master. Thanks, Mirko!
This patch has been pushed to 3.12.x, will be in 3.12.4. Thanks Mirko!
Pushed to 3.10.x, will be in 3.10.11
Pushed to 3.8.x, will be in 3.8.18