From ae20c836befe77f5277b3df14b7cf9810836634b Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Fri, 10 Feb 2017 15:34:07 +0100 Subject: [PATCH] SL::Mailer: Header-Felder nicht zwei mal MIME-encoden MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Das Modul Email::MIME kümmert sich bereits um das richtige MIME-Encoding der Header. Daher darf es vorher nicht gemacht werden. --- SL/Mailer.pm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/SL/Mailer.pm b/SL/Mailer.pm index 59b521834..0783d33a4 100644 --- a/SL/Mailer.pm +++ b/SL/Mailer.pm @@ -36,7 +36,6 @@ use SL::DB::Employee; use SL::Template; use strict; -use Encode; my $num_sent = 0; @@ -118,7 +117,7 @@ sub _create_address_headers { $addr_obj->phrase($phrase); } - push @header_addresses, encode('MIME-Header',$addr_obj->format); + push @header_addresses, $addr_obj->format; } push @{ $self->{headers} }, ( ucfirst($item) => join(', ', @header_addresses) ) if @header_addresses; @@ -233,7 +232,7 @@ sub send { $self->{charset} = 'UTF-8'; $self->{contenttype} ||= "text/plain"; $self->{headers} = [ - Subject => encode('MIME-Header',$self->{subject}), + Subject => $self->{subject}, 'Message-ID' => '<' . $self->_create_message_id . '>', 'X-Mailer' => "kivitendo $self->{version}", ]; -- 2.20.1