@@ -, +, @@ --- C4/Letters.pm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) --- a/C4/Letters.pm +++ a/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 of I and generates a MIME email, attaching the passed I using Koha::Email. The content is replaced by the string representation of the MIME object, - and the content-type is updated to B 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 --