From ee43823179ee627ac16ea9da8168e5f1bf9619c0 Mon Sep 17 00:00:00 2001 From: "Jannis M. Hoffmann" Date: Thu, 29 Oct 2020 12:13:04 +0100 Subject: Initial commit; Stable version --- templates/webmail/readmail.html.ep | 52 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 templates/webmail/readmail.html.ep (limited to 'templates/webmail/readmail.html.ep') diff --git a/templates/webmail/readmail.html.ep b/templates/webmail/readmail.html.ep new file mode 100644 index 0000000..f537d96 --- /dev/null +++ b/templates/webmail/readmail.html.ep @@ -0,0 +1,52 @@ +% layout 'mainlayout'; + +% my $mail_fmt = begin + % my ($category, $value) = @_; +
<%= ucfirst l $category %>
+
<%= ref $value ? join(' ' . l('and') . ' ', map {"$_->{name} <$_->{address}>"} @$value) : $value %>
+% end + +
+ +

Read Mail

+ +
+
<%= uc l 'subject' %>
+
<%= $msg->{subject} %>
+%= $mail_fmt->('from', $msg->{from}); +%= $mail_fmt->('to', $msg->{to}); +%= $mail_fmt->('cc', $msg->{cc}) if !ref $msg->{cc} || @{ $msg->{cc} }; +%= $mail_fmt->('bcc', $msg->{bcc}) if !ref $msg->{bcc} || @{ $msg->{cc} }; +
<%= uc l 'date' %>
+
<%= $msg->{date} %>
+
<%= uc l 'size' %>
+
<%= print_sizes10 $msg->{size} %>
+
<%= uc l 'content-type' %>
+
<%= $msg->{content_type} %>
+
+ +% my $body = $msg->{body}; + +% if ($msg->{content_type} eq 'multipart/alternative') { +% for (reverse @$body) { +
+% my $x = mime_render($_->{type}, $_->{val}); +%== $x; +% last if $x; +
+% } +% } +% elsif (ref $body eq 'HASH') { +% for (%$body) { +
+%== mime_render($_->{type}, $_->{val}); +
+% } +% } +% else { +
+%== mime_render($msg->{content_type}, $body); +
+% } + +
\ No newline at end of file -- cgit v1.2.3