From: Moritz Bunkus Date: Fri, 10 Feb 2017 14:34:07 +0000 (+0100) Subject: SL::Mailer: Header-Felder nicht zwei mal MIME-encoden X-Git-Tag: release-3.5.4~1495 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=ae20c836befe77f5277b3df14b7cf9810836634b;p=kivitendo-erp.git SL::Mailer: Header-Felder nicht zwei mal MIME-encoden Das Modul Email::MIME kümmert sich bereits um das richtige MIME-Encoding der Header. Daher darf es vorher nicht gemacht werden. --- 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}", ];