From e1bafc13858b5c72a7584c52d3d9d6d597d39e6b Mon Sep 17 00:00:00 2001 From: "Jannis M. Hoffmann" Date: Tue, 31 Aug 2021 20:23:03 +0200 Subject: restructured ipc format --- lib/JWebmail/Controller/Webmail.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/JWebmail/Controller') diff --git a/lib/JWebmail/Controller/Webmail.pm b/lib/JWebmail/Controller/Webmail.pm index f0f2efa..cd7b5c7 100644 --- a/lib/JWebmail/Controller/Webmail.pm +++ b/lib/JWebmail/Controller/Webmail.pm @@ -298,11 +298,11 @@ sub raw { } if (my $type = $self->param('body')) { - if ($mail->{content_type} =~ '^multipart/') { - my ($content) = grep {$_->{type} =~ $type} @{ $mail->{body} }; - $self->render(text => $content->{val}); + if ($mail->{head}{content_type} =~ '^multipart/') { + my ($content) = grep {$_->{head}{content_type} =~ $type} @{ $mail->{body} }; + $self->render(text => $content->{body}); } - elsif ($mail->{content_type} =~ $type) { + elsif ($mail->{head}{content_type} =~ $type) { $self->render(text => $mail->{body}) ; } else { -- cgit v1.2.3