From 01443da62d81ad72d6bdf5891dbe70488042b233 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Mon, 9 Jan 2017 15:10:56 +0100 Subject: [PATCH] Bug 17866: Change sender for serial claim notifications Content-Type: text/plain; charset=utf-8 Currently, the From field uses the emailaddress of the staff client member from the user context. This is exceptional in Koha. And might very well, as in our case, be the cause of fraud detection warnings. We should branch email address or fallback to KohaAdminEmailAddress, as we do (almost) everywhere else. Test plan: Go to subscription detail in Koha. Go to Claims. Select a missing issue and click Send notification. Verify the sender address in the generated notification. (Make sure that you receive this mail.) 0003-Bug-17736-Remove-C4-Reserves-GetReservesFromBiblionu.patch --- C4/Letters.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/C4/Letters.pm b/C4/Letters.pm index 3ff39b1..3f69477 100644 --- a/C4/Letters.pm +++ b/C4/Letters.pm @@ -572,10 +572,11 @@ sub SendAlerts { $letter->{content} =~ s/(.*?)<\/order>/$1/gxms; # ... then send mail + my $branchdetails = GetBranchDetail($userenv->{'branch'}); my %mail = ( To => join( ',', @email), Cc => join( ',', @cc), - From => $userenv->{emailaddress}, + From => $branchdetails->{'branchemail'} || C4::Context->preference('KohaAdminEmailAddress'), Subject => Encode::encode( "UTF-8", "" . $letter->{title} ), Message => $letter->{'is_html'} ? _wrap_html( Encode::encode( "UTF-8", $letter->{'content'} ), -- 2.1.4