Bugzilla – Attachment 171113 Details for
Bug 37598
Ability to use the BCC field for sending notices to multiple addresses, rather than the To field
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37598: Use EmailRecipientField for 'to', 'cc' or 'bcc' when sending notices to selected addresses
Bug-37598-Use-EmailRecipientField-for-to-cc-or-bcc.patch (text/plain), 2.55 KB, created by
Aleisha Amohia
on 2024-09-06 00:57:35 UTC
(
hide
)
Description:
Bug 37598: Use EmailRecipientField for 'to', 'cc' or 'bcc' when sending notices to selected addresses
Filename:
MIME Type:
Creator:
Aleisha Amohia
Created:
2024-09-06 00:57:35 UTC
Size:
2.55 KB
patch
obsolete
>From 0766384bd0e30a49cdf892b657cc40ba1851d700 Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Tue, 13 Aug 2024 00:49:54 +0000 >Subject: [PATCH] Bug 37598: Use EmailRecipientField for 'to', 'cc' or 'bcc' > when sending notices to selected addresses > >--- > C4/Letters.pm | 34 +++++++++++++++++++++++++++++++--- > 1 file changed, 31 insertions(+), 3 deletions(-) > >diff --git a/C4/Letters.pm b/C4/Letters.pm >index 7bdbfc9bf24..03132b9d292 100644 >--- a/C4/Letters.pm >+++ b/C4/Letters.pm >@@ -1451,6 +1451,34 @@ sub _send_message_by_email { > ); > return; > }; >+ >+ my $bcc_address = C4::Context->preference('NoticeBcc'); >+ >+ if ( C4::Context->preference('EmailFieldPrimary') eq "MULTI" >+ and C4::Context->preference('EmailRecipientField') eq "cc" ) >+ { >+ $cc_address = $cc_address ? join( ',', $cc_address, $to_address ) : $to_address; >+ _update_message_cc_address( $message->{'message_id'}, $cc_address ); >+ if ($count_guarantor_address) { >+ $to_address = shift @guarantor_address; >+ } else { >+ my @to_address = split( ',', $to_address ); >+ $to_address = shift @to_address; >+ } >+ _update_message_to_address( $message->{'message_id'}, $to_address ); >+ } elsif ( C4::Context->preference('EmailFieldPrimary') eq "MULTI" >+ and C4::Context->preference('EmailRecipientField') eq "bcc" ) >+ { >+ $bcc_address = $bcc_address ? join( ',', $bcc_address, $to_address ) : $to_address; >+ if ($count_guarantor_address) { >+ $to_address = shift @guarantor_address; >+ } else { >+ my @to_address = split( ',', $to_address ); >+ $to_address = shift @to_address; >+ } >+ _update_message_to_address( $message->{'message_id'}, $to_address ); >+ } >+ > my $email; > > try { >@@ -1458,8 +1486,8 @@ sub _send_message_by_email { > my $params = { > to => $to_address, > ( >- C4::Context->preference('NoticeBcc') >- ? ( bcc => C4::Context->preference('NoticeBcc') ) >+ $bcc_address >+ ? ( bcc => $bcc_address ) > : () > ), > ( >@@ -1476,7 +1504,7 @@ sub _send_message_by_email { > ? ( template_id => $message->{letter_id} ) > : () > ), >- message_id => $message->{id} >+ message_id => $message->{message_id} > }; > > if ( $message->{'content_type'} && $message->{'content_type'} eq SERIALIZED_EMAIL_CONTENT_TYPE ) { >-- >2.39.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 37598
:
170249
|
170250
|
170254
|
170255
|
170256
|
171112
| 171113 |
171114