Bugzilla – Attachment 30761 Details for
Bug 9530
Allow separate 'Reply To' and 'From' email address for notices
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 9530 making changes to opac/opac-sendbasket.pl
SIGNED-OFF-Bug-9530-making-changes-to-opacopac-sen.patch (text/plain), 2.28 KB, created by
Owen Leonard
on 2014-08-13 13:19:34 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 9530 making changes to opac/opac-sendbasket.pl
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2014-08-13 13:19:34 UTC
Size:
2.28 KB
patch
obsolete
>From ac326130f4c58feba2c4ef8df1a7f6e31a7dbe9e Mon Sep 17 00:00:00 2001 >From: Chris Cormack <chrisc@catalyst.net.nz> >Date: Tue, 12 Aug 2014 10:19:14 +1200 >Subject: [PATCH] [SIGNED-OFF] Bug 9530 making changes to > opac/opac-sendbasket.pl >Content-Type: text/plain; charset="utf-8" > >To Test > >1/ Edit the new systempreferences (ReplytoDefault and ReturnpathDefault) >2/ Optionally edit the branch the mail will be sent from, adding email addresses >3/ Send a cart from the public site (OPAC) >4/ Check that the mails have the correct From, Replyto and ReturnPath set > The rules are > If the values are set in the branch use that, else use the syspref > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >--- > opac/opac-sendbasket.pl | 18 +++++++++--------- > 1 file changed, 9 insertions(+), 9 deletions(-) > >diff --git a/opac/opac-sendbasket.pl b/opac/opac-sendbasket.pl >index 3cd81b1..8143cca 100755 >--- a/opac/opac-sendbasket.pl >+++ b/opac/opac-sendbasket.pl >@@ -33,6 +33,7 @@ use C4::Auth; > use C4::Output; > use C4::Biblio; > use C4::Members; >+use Koha::Email; > > my $query = new CGI; > >@@ -53,21 +54,20 @@ my $email_sender = $query->param('email_sender'); > my $dbh = C4::Context->dbh; > > if ( $email_add ) { >+ my $email = Koha::Email->new(); > my $user = GetMember(borrowernumber => $borrowernumber); > my $user_email = GetFirstValidEmailAddress($borrowernumber) > || C4::Context->preference('KohaAdminEmailAddress'); > >- my $email_from = C4::Context->preference('KohaAdminEmailAddress'); > my $email_replyto = "$user->{firstname} $user->{surname} <$user_email>"; > my $comment = $query->param('comment'); >- my %mail = ( >- To => $email_add, >- From => $email_from, >- 'Reply-To' => $email_replyto, >-# 'X-Orig-IP' => $ENV{'REMOTE_ADDR'}, >-# FIXME Commented out for now: discussion on privacy issue >- 'X-Abuse-Report' => C4::Context->preference('KohaAdminEmailAddress'), >- ); >+ >+ # if you want to use the KohaAdmin address as from, that is the default no need to set it >+ my %mail = $email->create_message_headers({ >+ to => $email_add, >+ replyto => $email_replyto, >+ }); >+ $mail{'X-Abuse-Report'} = C4::Context->preference('KohaAdminEmailAddress'); > > my ( $template2, $borrowernumber, $cookie ) = get_template_and_user( > { >-- >1.7.9.5
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 9530
:
30717
|
30718
|
30719
|
30720
|
30721
|
30722
|
30723
|
30724
|
30725
|
30740
|
30741
|
30742
|
30743
|
30760
|
30761
|
30762
|
30763
|
31169
|
31196
|
31926
|
31927
|
31928
|
31929
|
31930
|
31931
|
31932
|
31933
|
31934
|
31935
|
32799