diff options
Diffstat (limited to 'lib/JWebmail/Controller/Webmail.pm')
-rw-r--r-- | lib/JWebmail/Controller/Webmail.pm | 8 |
1 files changed, 4 insertions, 4 deletions
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 { |