Bugzilla – Attachment 19923 Details for
Bug 10621
Subscription alert emails have wrong from-address
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10621 Subscription alert emails have wrong from-address
Bug-10621-Subscription-alert-emails-have-wrong-fro.patch (text/plain), 1.99 KB, created by
Chris Cormack
on 2013-07-24 07:22:09 UTC
(
hide
)
Description:
Bug 10621 Subscription alert emails have wrong from-address
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2013-07-24 07:22:09 UTC
Size:
1.99 KB
patch
obsolete
>From 0790b73a891646c427b5406b99f13ea3e93dba51 Mon Sep 17 00:00:00 2001 >From: Mirko Tietgen <mirko@abunchofthings.net> >Date: Tue, 23 Jul 2013 23:24:11 +0200 >Subject: [PATCH] Bug 10621 Subscription alert emails have wrong from-address > >From-address and to-address were the same (patron's email) for subscription alerts. This patch changes 'from' the branch or kohaadminemailaddress > >To test >- add a subscription in staff/serials in case you don't have any >- enable patron notifications or the subscription >- in the OPAC, subscribe to the serial >- in staff/serial, receive an issue of the serial > >Before applying the patch, the email that is supposed to be sent has the patron's email as 'from' and 'to' (and is likely to fail). > >If you follow the steps after applying the patch, the email alert should have the 'from' address of the patron's branch or kohaadminemiladdress -- which should also work fine with the MTA/SMTP you have set up for messaging. > >Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> >--- > C4/Letters.pm | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >diff --git a/C4/Letters.pm b/C4/Letters.pm >index 37883c6..93bc34d 100644 >--- a/C4/Letters.pm >+++ b/C4/Letters.pm >@@ -288,6 +288,7 @@ sub SendAlerts { > > # warn "sending issues..."; > my $userenv = C4::Context->userenv; >+ my $branchdetails = GetBranchDetail($_->{'branchcode'}); > my $letter = GetPreparedLetter ( > module => 'serial', > letter_code => $letter_code, >@@ -304,7 +305,7 @@ sub SendAlerts { > # ... then send mail > my %mail = ( > To => $email, >- From => $email, >+ From => $branchdetails->{'branchemail'} || C4::Context->preference("KohaAdminEmailAddress"), > Subject => Encode::encode( "utf8", "" . $letter->{title} ), > Message => Encode::encode( "utf8", "" . $letter->{content} ), > 'Content-Type' => 'text/plain; charset="utf8"', >-- >1.8.1.2
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 10621
:
19889
|
19890
|
19923
|
19945