Skip to content
This repository has been archived by the owner on Jan 27, 2021. It is now read-only.

Commit

Permalink
Fixed: Perl 5.18.1 problems with MIME::Entity (bug#9832).
Browse files Browse the repository at this point in the history
  • Loading branch information
mbeijen committed Nov 4, 2013
1 parent cda6c2e commit 3200f38
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
@@ -1,4 +1,5 @@
#3.2.12 2013-11-05
- 2013-11-04 Fixed bug#[9832](http://bugs.otrs.org/show_bug.cgi?id=9832) - Perl 5.18.1 problems with MIME::Entity.
- 2013-10-31 Updated French translation, thanks to Olivier Sallou!
- 2013-10-31 Fixed bug#[9910](http://bugs.otrs.org/show_bug.cgi?id=9910) - Startup warnings/errors with Perl 5.18.1.
- 2013-10-29 Fixed bug#[9753](http://bugs.otrs.org/show_bug.cgi?id=9753) - META HTTP-EQUIV="Refresh" tag not stripped from HTML email.
Expand Down
9 changes: 3 additions & 6 deletions Kernel/System/Email.pm
Expand Up @@ -313,11 +313,6 @@ sub Send {
$Header{Encoding} = $Self->{ConfigObject}->Get('SendmailEncodingForce');
}

# body encode if utf8 and base64 is used
if ( $Header{Encoding} =~ /utf(8|-8)/i && $Header{Encoding} =~ /base64/i ) {
$Self->{EncodeObject}->EncodeOutput( \$Param{Body} );
}

# check and create message id
if ( $Param{'Message-ID'} ) {
$Header{'Message-ID'} = $Param{'Message-ID'};
Expand All @@ -339,7 +334,9 @@ sub Send {
);
}

# build MIME::Entity
# build MIME::Entity, Data should be bytes, not utf-8
# see http://bugs.otrs.org/show_bug.cgi?id=9832
$Self->{EncodeObject}->EncodeOutput( \$Param{Body} );
my $Entity = MIME::Entity->build( %Header, Data => $Param{Body} );

# set In-Reply-To and References header
Expand Down
11 changes: 11 additions & 0 deletions scripts/test/Email.t
Expand Up @@ -62,6 +62,17 @@ my @Tests = (
Charset => 'utf8',
},
},
{
Name => 'utf8 - high unicode characters',
Data => {
From => '"Служба поддержки (support)" <me@example.com>',
To => 'friend@example.com',
Subject => 'Test related to bug#9832',
Body => "\x{2660}",
Type => 'text/plain',
Charset => 'utf8',
},
},
);

my $Count = 0;
Expand Down

4 comments on commit 3200f38

@mschiff
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cannot find this fix in the 3.2.12 tarball... hmmm any Idea what wrong?

@jensoliver
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this Bug was fixed with 3.3.1

@mschiff
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the answer. Was this forgotten to merge? Will the fix work in 3.2.12? Thanks

@jensoliver
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know. But latest version of 3.2. was 3.2.16.
With today there will not be any support and bugfixes for 3.2. any more. You should update to the latest stable OTRS4 or at least to 3.3.10

Please sign in to comment.