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 <martin.renvoize@ptfs-europe.com>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Martin Renvoize 2020-03-02 15:16:37 +00:00
parent 7de7d4095a
commit fc8f2d261b
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
1 changed files with 3 additions and 3 deletions

6
opac/opac-reportproblem.pl Normal file → Executable file
View File

@ -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,
});
}