Bugzilla – Attachment 21352 Details for
Bug 5544
All Notices from Branch Email Address
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 5544 - All Notices from Branch Email Address
Bug-5544---All-Notices-from-Branch-Email-Address.patch (text/plain), 2.78 KB, created by
Marcel de Rooy
on 2013-09-23 10:18:38 UTC
(
hide
)
Description:
Bug 5544 - All Notices from Branch Email Address
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2013-09-23 10:18:38 UTC
Size:
2.78 KB
patch
obsolete
>From 6fe3c1afa616f0c7d000db081513e68c0b7fb4b3 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Wed, 9 May 2012 12:47:19 -0400 >Subject: [PATCH] Bug 5544 - All Notices from Branch Email Address >Content-Type: text/plain; charset=utf-8 > >Right now overdues come from the branch, but the >others come from the admin email address - this >is a problem in multi-branch systems because they >have to come up with one email address that all >branches have access to. > >C4::Letters::_send_message_by_email currently sets >the from address in the following order: >1) Address specified in message >2) Koha admin email address > >The order will now be: >1) Address specified in message >2) Borrowers home library email address >3) Koha admin email address > >Test Plan: >1) Set your branch email addresses, and the KohaAdminEmailAddress > Make sure each of them are unqiue >2) Choose a borrower, enable the enhanced messaging and enable the > checkout and checkin email notices. Use your email address for > the borrower's email so you can recieve the emails. >3) Check out an item, check the from address of the email, > it should be the email addres set in KohaAdminEmailAddress >4) Apply the patch >5) Return the item, check the from address of the email, > it should match the email address set for the borrowers > home library. > >Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > C4/Letters.pm | 6 +++--- > 1 files changed, 3 insertions(+), 3 deletions(-) > >diff --git a/C4/Letters.pm b/C4/Letters.pm >index 93bc34d..bb327a2 100644 >--- a/C4/Letters.pm >+++ b/C4/Letters.pm >@@ -920,9 +920,9 @@ sub _send_message_by_email { > my $message = shift or return; > my ($username, $password, $method) = @_; > >- my $to_address = $message->{to_address}; >+ my $member = C4::Members::GetMember( 'borrowernumber' => $message->{'borrowernumber'} ); >+ my $to_address = $message->{'to_address'}; > unless ($to_address) { >- my $member = C4::Members::GetMember( 'borrowernumber' => $message->{'borrowernumber'} ); > unless ($member) { > warn "FAIL: No 'to_address' and INVALID borrowernumber ($message->{borrowernumber})"; > _set_message_status( { message_id => $message->{'message_id'}, >@@ -947,7 +947,7 @@ sub _send_message_by_email { > my $is_html = $content_type =~ m/html/io; > my %sendmail_params = ( > To => $to_address, >- From => $message->{'from_address'} || C4::Context->preference('KohaAdminEmailAddress'), >+ From => $message->{'from_address'} || GetBranchDetail( $member->{'branchcode'} )->{'branchemail'} || C4::Context->preference('KohaAdminEmailAddress'), > Subject => $subject, > charset => 'utf8', > Message => $is_html ? _wrap_html($content, $subject) : $content, >-- >1.7.7.6
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 5544
:
9491
|
12164
|
14888
|
18036
|
19437
|
20807
| 21352 |
21353