From 854a0a64435f66e994d6e8c217425b9ec102d971 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Mon, 2 Mar 2020 15:16:37 +0000 Subject: [PATCH] Bug 4461: Drop 'from_address' use 'reply_address' This patch adds support for using the reply-to field added in bug 10269 and drops 'from_address' as it will get defined at a later stage in the emailing process anyway. Signed-off-by: Martin Renvoize --- opac/opac-reportproblem.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) mode change 100644 => 100755 opac/opac-reportproblem.pl diff --git a/opac/opac-reportproblem.pl b/opac/opac-reportproblem.pl old mode 100644 new mode 100755 index c8e0d2a..fa6171b --- a/opac/opac-reportproblem.pl +++ b/opac/opac-reportproblem.pl @@ -94,8 +94,8 @@ if ( $op eq 'addreport' ) { } ); - my $from_address = C4::Context->preference('KohaAdminEmailAddress'); my $transport = 'email'; + my $reply_address = $patron->email || $patron->emailpro || $patron->B_email; if ( $recipient eq 'admin' ) { C4::Letters::EnqueueLetter({ @@ -103,7 +103,7 @@ if ( $op eq 'addreport' ) { borrowernumber => $borrowernumber, message_transport_type => $transport, to_address => C4::Context->preference('KohaAdminEmailAddress'), - from_address => $from_address, + reply_address => $reply_address, }); } else { C4::Letters::EnqueueLetter({ @@ -111,7 +111,7 @@ if ( $op eq 'addreport' ) { borrowernumber => $borrowernumber, message_transport_type => $transport, to_address => $library->branchemail, - from_address => $from_address, + reply_address => $reply_address, }); } -- 2.1.4