diff --git a/mailboxes/view_mail.cgi b/mailboxes/view_mail.cgi index 199a4df15..9eefa8c41 100755 --- a/mailboxes/view_mail.cgi +++ b/mailboxes/view_mail.cgi @@ -89,6 +89,16 @@ foreach $s (@sub) { @attach = grep { $_ ne $body && $_ ne $dstatus } @attach; @attach = grep { !$_->{'attach'} } @attach; +# Calendar attachments +my @calendars; +eval { +foreach my $i (grep { $_->{'data'} } + grep { $_->{'type'} =~ /^text\/calendar/ } @attach) { + my $calendars = &parse_calendar_file($i->{'data'}); + push(@calendars, @{$calendars}); + }}; + +# Mail buttons if ($config{'top_buttons'} == 2 && &editable_mail($mail)) { &show_mail_buttons(1, scalar(@sub)); print "

\n";