Bug 22821: Use 'reply-to' address in issue notes

This patch updates the issue notices to not pass from_address and so
default to the branch email of the user for from_address. We now pass
the patrons email (cascading through email, emailpro, B_email) into the
reply_address field so mail servers are less likely to report emails as
spam and mail clients still have access to the patron address via the
reply-to header when staff want to hit 'reply' and have the email go to
the user.

Signed-off-by: Myka Kennedy Stephens <mkstephens@lancasterseminary.edu>
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-02-25 09:05:18 +00:00
parent cd2b79b871
commit 04dcca4321
Signed by: martin.renvoize
GPG key ID: 422B469130441A0F
2 changed files with 4 additions and 4 deletions

View file

@ -82,14 +82,14 @@ if ( $action eq 'issuenote' && C4::Context->preference('AllowCheckoutNotes') ) {
);
my $to_address = $branch->branchemail || $branch->branchreplyto || C4::Context->ReplytoDefault || C4::Context->preference('KohaAdminEmailAddress');
my $from_address = $patron->email || $patron->emailpro || $patron->B_email;
my $reply_address = $patron->email || $patron->emailpro || $patron->B_email;
C4::Letters::EnqueueLetter({
letter => $letter,
message_transport_type => 'email',
borrowernumber => $patron->borrowernumber,
to_address => $to_address,
from_address => $from_address,
reply_address => $reply_address,
});
}
}

View file

@ -92,14 +92,14 @@ if ($is_ajax) {
);
my $to_address = $branch->branchemail || $branch->branchreplyto || C4::Context->preference('ReplytoDefault') || C4::Context->preference('KohaAdminEmailAddress');
my $from_address = $patron->email || $patron->emailpro || $patron->B_email;
my $reply_address = $patron->email || $patron->emailpro || $patron->B_email;
C4::Letters::EnqueueLetter({
letter => $letter,
message_transport_type => 'email',
borrowernumber => $patron->borrowernumber,
to_address => $to_address,
from_address => $from_address,
reply_address => $reply_address,
});
} else { # note empty, i.e removed
$status = "removed";