From de698e810c72f0f81a5ccf5422e2f392dd755fbe Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Wed, 12 Nov 2014 06:23:47 -0500 Subject: [PATCH] Bug 13241 - Notice for account details ( ACCTDETAILS ) will only send in plain text even if HTML is selected The notice ACCTDETAILS will be sent to a new patron on creation if that account has an email address. This notice will always be send in plain text even if the html option is selected in the notice editor. Test Plan: 1) Create an ACCTDETAILS notice containing html, ensure that the "HTML message" box is checked. 2) Create a new patron with an email address you control 3) Read the email that is sent to you, notice it is in plain text with the html markup clearly visible 4) Apply this patch 5) Delete the patron, and re-create the patron again 6) Note that this time the HTML is parsed correctly --- C4/Letters.pm | 15 +++++++-------- 1 files changed, 7 insertions(+), 8 deletions(-) diff --git a/C4/Letters.pm b/C4/Letters.pm index 519c0f6..fe45016 100644 --- a/C4/Letters.pm +++ b/C4/Letters.pm @@ -286,14 +286,13 @@ sub SendAlerts { my $message = Koha::Email->new(); my %mail = $message->create_message_headers( { - to => $email, - from => $branchdetails->{'branchemail'}, - replyto => $branchdetails->{'branchreplyto'}, - sender => $branchdetails->{'branchreturnpath'}, - subject => Encode::encode( "utf8", "" . $letter->{title} ), - message => - Encode::encode( "utf8", "" . $letter->{content} ), - contenttype => 'text/plain; charset="utf8"', + to => $email, + from => $branchdetails->{'branchemail'}, + replyto => $branchdetails->{'branchreplyto'}, + sender => $branchdetails->{'branchreturnpath'}, + subject => Encode::encode( "utf8", "" . $letter->{title} ), + message => Encode::encode( "utf8", "" . $letter->{content} ), + contenttype => $letter->{'content-type'} || 'text/plain; charset="utf8"', } ); -- 1.7.2.5