Bugzilla – Attachment 127573 Details for
Bug 29330
Koha cannot send emails with attachments using Koha::Email and message_queue table
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29330: (QA follow-up) Change to message/rfc822
Bug-29330-QA-follow-up-Change-to-messagerfc822.patch (text/plain), 2.03 KB, created by
Marcel de Rooy
on 2021-11-12 09:16:54 UTC
(
hide
)
Description:
Bug 29330: (QA follow-up) Change to message/rfc822
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2021-11-12 09:16:54 UTC
Size:
2.03 KB
patch
obsolete
>From 66d357e3183791c70ffb75f8f6a0a4b25de74c7d Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Fri, 12 Nov 2021 08:55:42 +0000 >Subject: [PATCH] Bug 29330: (QA follow-up) Change to message/rfc822 >Content-Type: text/plain; charset=utf-8 > >This content-type might be more appropriated to use as a temporary >label for the serialized email message with attachments. > >WARNING: perl -cw tells you that the constant is redefined. This has >to do with an already existing module dependency loop of Letters. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > C4/Letters.pm | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) > >diff --git a/C4/Letters.pm b/C4/Letters.pm >index 58e6293068..c36553ac9a 100644 >--- a/C4/Letters.pm >+++ b/C4/Letters.pm >@@ -40,6 +40,8 @@ use Koha::Patrons; > use Koha::SMTP::Servers; > use Koha::Subscriptions; > >+use constant SERIALIZED_EMAIL_CONTENT_TYPE => 'message/rfc822'; >+ > our (@ISA, @EXPORT_OK); > BEGIN { > require Exporter; >@@ -1230,7 +1232,7 @@ sub ResendMessage { > This routine picks the I<content> of I<letter> and generates a MIME > email, attaching the passed I<attachments> using Koha::Email. The > content is replaced by the string representation of the MIME object, >- and the content-type is updated to B<MIME> for later handling. >+ and the content-type is updated for later handling. > > =cut > >@@ -1259,7 +1261,7 @@ sub _add_attachments { > ); > } > >- $letter->{'content-type'} = 'MIME'; >+ $letter->{'content-type'} = SERIALIZED_EMAIL_CONTENT_TYPE; > $letter->{content} = $message->as_string; > > return $letter; >@@ -1409,7 +1411,7 @@ sub _send_message_by_email { > subject => "" . $message->{subject} > }; > >- if ( $message->{'content_type'} && $message->{'content_type'} eq 'MIME' ) { >+ if ( $message->{'content_type'} && $message->{'content_type'} eq SERIALIZED_EMAIL_CONTENT_TYPE ) { > > # The message has been previously composed as a valid MIME object > # and serialized as a string on the DB >-- >2.20.1
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 29330
:
127404
|
127405
|
127413
|
127414
|
127418
|
127419
|
127429
|
127430
|
127437
|
127444
|
127570
|
127571
|
127572
| 127573