Bugzilla – Attachment 88875 Details for
Bug 8000
Test mode for notices
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 8000: (QA follow-up) Centralise Bcc too
Bug-8000-QA-follow-up-Centralise-Bcc-too.patch (text/plain), 4.58 KB, created by
Marcel de Rooy
on 2019-04-26 10:20:48 UTC
(
hide
)
Description:
Bug 8000: (QA follow-up) Centralise Bcc too
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2019-04-26 10:20:48 UTC
Size:
4.58 KB
patch
obsolete
>From a46afc759acd2b7411ccf484d75fbf1c7cdeb6d0 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Mon, 29 Oct 2018 12:58:51 +0000 >Subject: [PATCH] Bug 8000: (QA follow-up) Centralise Bcc too >Content-Type: text/plain; charset=utf-8 > >Signed-off-by: Josef Moravec <josef.moravec@gmail.com> > >Signed-off-by: Liz Rea <wizzyrea@gmail.com> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > C4/Letters.pm | 47 +++++++++++++++++++++++++---------------------- > Koha/Email.pm | 1 + > 2 files changed, 26 insertions(+), 22 deletions(-) > >diff --git a/C4/Letters.pm b/C4/Letters.pm >index f08ee11521..c23d8cc90e 100644 >--- a/C4/Letters.pm >+++ b/C4/Letters.pm >@@ -483,29 +483,30 @@ sub SendAlerts { > my $email = Koha::Email->new(); > my %mail = $email->create_message_headers( > { >- to => join( ',', @email), >- cc => join( ',', @cc), >- from => $library->branchemail || C4::Context->preference('KohaAdminEmailAddress'), >+ to => join( ',', @email ), >+ cc => join( ',', @cc ), >+ ( >+ ( >+ C4::Context->preference("ClaimsBccCopy") >+ && ( $type eq 'claimacquisition' >+ || $type eq 'claimissues' ) >+ ) ? ( bcc => $userenv->{emailaddress} ) >+ : () >+ ), >+ from => $library->branchemail >+ || C4::Context->preference('KohaAdminEmailAddress'), > subject => Encode::encode( "UTF-8", "" . $letter->{title} ), >- message => $letter->{'is_html'} >- ? _wrap_html( Encode::encode( "UTF-8", $letter->{'content'} ), >- Encode::encode( "UTF-8", "" . $letter->{'title'} )) >- : Encode::encode( "UTF-8", "" . $letter->{'content'} ), >+ message => $letter->{'is_html'} ? _wrap_html( >+ Encode::encode( "UTF-8", $letter->{'content'} ), >+ Encode::encode( "UTF-8", "" . $letter->{'title'} ) >+ ) >+ : Encode::encode( "UTF-8", "" . $letter->{'content'} ), > contenttype => $letter->{'is_html'} >- ? 'text/html; charset="utf-8"' >- : 'text/plain; charset="utf-8"', >+ ? 'text/html; charset="utf-8"' >+ : 'text/plain; charset="utf-8"', > } > ); > >- if ($type eq 'claimacquisition' || $type eq 'claimissues' ) { >- $mail{'Reply-to'} = C4::Context->preference('ReplytoDefault') >- if C4::Context->preference('ReplytoDefault'); >- $mail{'Sender'} = C4::Context->preference('ReturnpathDefault') >- if C4::Context->preference('ReturnpathDefault'); >- $mail{'Bcc'} = $userenv->{emailaddress} >- if C4::Context->preference("ClaimsBccCopy") and not C4::Context->preference("SendAllEmailsTo"); >- } >- > unless ( Mail::Sendmail::sendmail(%mail) ) { > carp $Mail::Sendmail::error; > return { error => $Mail::Sendmail::error }; >@@ -1306,7 +1307,12 @@ sub _send_message_by_email { > my $email = Koha::Email->new(); > my %sendmail_params = $email->create_message_headers( > { >- to => $to_address, >+ to => $to_address, >+ ( >+ C4::Context->preference('NoticeBcc') >+ ? ( bcc => C4::Context->preference('NoticeBcc') ) >+ : () >+ ), > from => $message->{'from_address'} || $branch_email, > replyto => $branch_replyto, > sender => $branch_returnpath, >@@ -1317,9 +1323,6 @@ sub _send_message_by_email { > ); > > $sendmail_params{'Auth'} = {user => $username, pass => $password, method => $method} if $username; >- if ( my $bcc = C4::Context->preference('NoticeBcc') ) { >- $sendmail_params{ Bcc } = C4::Context->preference("SendAllEmailsTo") || $bcc; >- } > > _update_message_to_address($message->{'message_id'},$to_address) unless $message->{to_address}; #if initial message address was empty, coming here means that a to address was found and queue should be updated > >diff --git a/Koha/Email.pm b/Koha/Email.pm >index b9e32419e1..58340756e8 100644 >--- a/Koha/Email.pm >+++ b/Koha/Email.pm >@@ -56,6 +56,7 @@ sub create_message_headers { > } > else { > $mail{'Cc'} = $params->{cc}; >+ $mail{'Bcc'} = $params->{bcc}; > } > > if ( C4::Context->preference('ReplytoDefault') ) { >-- >2.11.0
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 8000
:
21976
|
22315
|
24784
|
25917
|
25919
|
25920
|
25923
|
25924
|
25925
|
25926
|
25927
|
25928
|
25939
|
25950
|
25951
|
26446
|
37463
|
37464
|
37465
|
37466
|
37467
|
37468
|
37469
|
37472
|
37473
|
37474
|
37475
|
37476
|
37477
|
37478
|
37481
|
37482
|
37483
|
37484
|
37485
|
37486
|
37487
|
39985
|
39986
|
39987
|
39988
|
39989
|
39990
|
39991
|
39992
|
40215
|
40216
|
40217
|
40218
|
40219
|
40220
|
40221
|
40222
|
40223
|
40224
|
40225
|
40226
|
40227
|
40228
|
40229
|
40230
|
46354
|
46355
|
46356
|
46357
|
46358
|
46359
|
46360
|
46361
|
46362
|
49991
|
49992
|
49993
|
49998
|
49999
|
50000
|
55940
|
58434
|
62863
|
67155
|
70086
|
70087
|
70484
|
74110
|
74111
|
74848
|
80370
|
81487
|
81488
|
81589
|
81590
|
81591
|
84801
|
84802
|
84803
|
84804
|
84805
|
86861
|
86862
|
86863
|
86864
|
86865
|
88874
| 88875 |
88876
|
88877
|
88878
|
88879