From 5c4ca5df0a2b37b09e7c2db2f0e2abf171303a5b Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 26 Feb 2020 11:08:51 +0100 Subject: [PATCH] Bug 4461: Use KohaAdminEmailAddress pref as 'from' We usually do not specify the from_address on enqueuing the notice, but when sending it (from _send_message_by_email). That way a) the code is centralized (as we must use $patron->notice_email_address) and b) the email used is the one that is in the DB when the letter is effectively sent. Here I guess you need to give it when the notice is enqueued as you want to default to the koha admin address. I do not think it's a good idea, we should not send an email with "from" if not really sent by the user. We have the borrowernumber anyway to know who filled the form. Signed-off-by: Martin Renvoize --- opac/opac-reportproblem.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opac/opac-reportproblem.pl b/opac/opac-reportproblem.pl index 77cacfeddd..a6795c10eb 100644 --- a/opac/opac-reportproblem.pl +++ b/opac/opac-reportproblem.pl @@ -109,7 +109,7 @@ if ( $op eq 'addreport' ) { } ); - my $from_address = $member->email || $member->emailpro || $member->B_email || $koha_admin; + my $from_address = C4::Context->preference('KohaAdminEmailAddress'); my $transport = 'email'; if ( $recipient eq 'admin' ) { -- 2.20.1