From 15dd7ef72ff101a8886a9a0c8e9b27c9963a9a38 Mon Sep 17 00:00:00 2001 From: "Jannis M. Hoffmann" Date: Sat, 4 Mar 2023 18:08:03 +0100 Subject: fix readmail get body --- lib/JWebmail/Controller/Webmail.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/JWebmail') diff --git a/lib/JWebmail/Controller/Webmail.pm b/lib/JWebmail/Controller/Webmail.pm index a1d25c3..6d0cc55 100644 --- a/lib/JWebmail/Controller/Webmail.pm +++ b/lib/JWebmail/Controller/Webmail.pm @@ -68,7 +68,7 @@ sub login { my $uses_cram = $self->config->{session}{secure} eq 'cram'; my $v = $self->validation; - + my $user = $v->required('userid')->size(4, 50)->param; my $passwd = $v->required('password')->size(4, 50)->like(qr/^.+$/)->param; # no new-lines my $challenge; @@ -211,11 +211,11 @@ sub readmail { if ($type) { if ($mail->{head}{mime}{content_maintype} eq 'multipart') { - my $content = first {$_->{head}{mime}{content_subtype} eq $type} $mail->{body}{parts}->@*; + my $content = first {$_->{head}{content_subtype} eq $type} $mail->{body}{parts}->@*; $self->render(text => $content->{body}); } elsif ($mail->{head}{mime}{content_subtype} eq $type) { - $self->render(text => $mail->{body}) ; + $self->render(text => $mail->{body}); } else { $self->reply->not_found; @@ -311,7 +311,7 @@ __END__ =encoding utf-8 -=head1 NAME +=head1 NAME Webmail - All functions comprising the webmail application. -- cgit v1.2.3