Bugzilla – Attachment 99907 Details for
Bug 10269
Add a way to utilise a specific replyto email address for some notices
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10269: Use 'reply-to' address if passed to EnqueueLetter
Bug-10269-Use-reply-to-address-if-passed-to-Enqueu.patch (text/plain), 3.63 KB, created by
Martin Renvoize (ashimema)
on 2020-03-02 14:08:43 UTC
(
hide
)
Description:
Bug 10269: Use 'reply-to' address if passed to EnqueueLetter
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2020-03-02 14:08:43 UTC
Size:
3.63 KB
patch
obsolete
>From 218a83aa4581f1abdf6163c4ff987f418d773cde Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Tue, 25 Feb 2020 09:05:18 +0000 >Subject: [PATCH] Bug 10269: Use 'reply-to' address if passed to EnqueueLetter > >This patch updates the EnqueueLetter method to allow passing a reply_to >address. This allows for passing in arbitrary addresses for the reply >address which will not override the from address. This improves the >chances of your email getting past spam filters. > >Signed-off-by: Myka Kennedy Stephens <mkstephens@lancasterseminary.edu> >--- > C4/Letters.pm | 11 ++++++----- > 1 file changed, 6 insertions(+), 5 deletions(-) > >diff --git a/C4/Letters.pm b/C4/Letters.pm >index 0233ef52f4..7c5d470bb0 100644 >--- a/C4/Letters.pm >+++ b/C4/Letters.pm >@@ -912,9 +912,9 @@ sub EnqueueLetter { > my $dbh = C4::Context->dbh(); > my $statement = << 'ENDSQL'; > INSERT INTO message_queue >-( borrowernumber, subject, content, metadata, letter_code, message_transport_type, status, time_queued, to_address, from_address, content_type ) >+( borrowernumber, subject, content, metadata, letter_code, message_transport_type, status, time_queued, to_address, from_address, reply_address, content_type ) > VALUES >-( ?, ?, ?, ?, ?, ?, ?, NOW(), ?, ?, ? ) >+( ?, ?, ?, ?, ?, ?, ?, NOW(), ?, ?, ?, ? ) > ENDSQL > > my $sth = $dbh->prepare($statement); >@@ -928,6 +928,7 @@ ENDSQL > 'pending', # status > $params->{'to_address'}, # to_address > $params->{'from_address'}, # from_address >+ $params->{'reply_address'}, # reply_address > $params->{'letter'}->{'content-type'}, # content_type > ); > return $dbh->last_insert_id(undef,undef,'message_queue', undef); >@@ -1124,7 +1125,7 @@ sub GetMessage { > return unless $message_id; > my $dbh = C4::Context->dbh; > return $dbh->selectrow_hashref(q| >- SELECT message_id, borrowernumber, subject, content, metadata, letter_code, message_transport_type, status, time_queued, updated_on, to_address, from_address, content_type >+ SELECT message_id, borrowernumber, subject, content, metadata, letter_code, message_transport_type, status, time_queued, updated_on, to_address, from_address, reply_address, content_type > FROM message_queue > WHERE message_id = ? > |, {}, $message_id ); >@@ -1228,7 +1229,7 @@ sub _get_unsent_messages { > > my $dbh = C4::Context->dbh(); > my $statement = qq{ >- SELECT mq.message_id, mq.borrowernumber, mq.subject, mq.content, mq.message_transport_type, mq.status, mq.time_queued, mq.from_address, mq.to_address, mq.content_type, b.branchcode, mq.letter_code >+ SELECT mq.message_id, mq.borrowernumber, mq.subject, mq.content, mq.message_transport_type, mq.status, mq.time_queued, mq.from_address, mq.reply_address, mq.to_address, mq.content_type, b.branchcode, mq.letter_code > FROM message_queue mq > LEFT JOIN borrowers b ON b.borrowernumber = mq.borrowernumber > WHERE status = ? >@@ -1314,7 +1315,7 @@ sub _send_message_by_email { > : () > ), > from => $message->{'from_address'} || $branch_email, >- replyto => $branch_replyto, >+ replyto => $message->{'reply_address'} || $branch_replyto, > sender => $branch_returnpath, > subject => $subject, > message => $is_html ? _wrap_html( $content, $subject ) : $content, >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 10269
:
99905
|
99906
|
99907
|
100931
|
100932
|
100933