From 2abf462ca10c4ac8c4f815e608cad31851e966e3 Mon Sep 17 00:00:00 2001 From: "Jannis M. Hoffmann" Date: Sun, 26 Feb 2023 21:36:27 +0100 Subject: Specified the interface for qmauth Changes to configuration Added qmauth version written in Python Slight changes to pagination --- templates/webmail/readmail.html.ep | 43 +++++++++++++++++++++----------------- 1 file changed, 24 insertions(+), 19 deletions(-) (limited to 'templates/webmail') diff --git a/templates/webmail/readmail.html.ep b/templates/webmail/readmail.html.ep index 5bad9f3..b5b48a1 100644 --- a/templates/webmail/readmail.html.ep +++ b/templates/webmail/readmail.html.ep @@ -2,10 +2,14 @@ % my $mail_fmt = begin % my ($category, $value) = @_; -
<%= ucfirst l $category %>
-
- %= ref $value ? join(' ' . l('and') . ' ', map {"$_->{name} <$_->{address}>"} @$value) : $value -
+ % if (ref $value eq 'ARRAY' && $value->@*) { +
<%= uc l $category %>
+ % for ($value->@*) { +
+ %= $_->{name} ? qq("$_->{name}" <$_->{address}>) : "$_->{address}" +
+ % } + % } % end
@@ -16,42 +20,43 @@
<%= uc l 'subject' %>
<%= $msg->{head}{subject} %>
- %= $mail_fmt->('from', $msg->{head}{from}) - %= $mail_fmt->('to', $msg->{head}{to}) - %= $mail_fmt->('cc', $msg->{head}{cc}) if !ref $msg->{head}{cc} || @{ $msg->{head}{cc} } - %= $mail_fmt->('bcc', $msg->{head}{bcc}) if !ref $msg->{head}{bcc} || @{ $msg->{head}{bcc} } + %= $mail_fmt->(from => $msg->{head}{from}) + %= $mail_fmt->(to => $msg->{head}{to}) + %= $mail_fmt->(cc => $msg->{head}{cc}) + %= $mail_fmt->(bcc => $msg->{head}{bcc})
<%= uc l 'date' %>
<%= $msg->{head}{date} %>
-
<%= uc l 'size' %>
-
<%= print_sizes10 $msg->{size} %>
- + % my $content_type = $msg->{head}{mime}{content_maintype} . '/' . $msg->{head}{mime}{content_subtype};
<%= uc l 'content-type' %>
-
<%= $msg->{head}{content_type} %>
+
<%= $content_type %>
% my $body = $msg->{body}; -% if ($msg->{head}{content_type} eq 'multipart/alternative') { -% for (reverse @$body) { +% if ($content_type eq 'multipart/alternative') { +% for (reverse @{$body->{parts}}) {
-% my $x = mime_render($_->{head}{content_type}, $_->{body}); +% my $x = mime_render($_->{head}{content_maintype}.'/'.$_->{head}{content_subtype}, $_->{body}); %== $x;
% last if $x; % } % } -% elsif (ref $body eq 'HASH') { -% for (%$body) { +% elsif ($msg->{head}{mime}{content_maintype} eq 'multipart') { +% for (@{$body->{parts}}) {
- %== mime_render($_->{head}{content_type}, $_->{body}); + %== mime_render($_->{head}{content_maintype}.'/'.$_->{head}{content_subtype}, $_->{body});
% } % } +% elsif ($msg->{head}{mime}{content_maintype} eq 'message') { +% die "not implemented" +% } % else {
- %== mime_render($msg->{head}{content_type}, $body); + %== mime_render($content_type, $body);
% } -- cgit v1.2.3