diff --git a/mailbox/view_mail.cgi b/mailbox/view_mail.cgi index 35dd3d61..2b7ed1de 100755 --- a/mailbox/view_mail.cgi +++ b/mailbox/view_mail.cgi @@ -119,6 +119,15 @@ if ($userconfig{'auto_mark'}) { my ($deccode, $decmessage) = &decrypt_attachments($mail); my @attach = @{$mail->{'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}); + }}; + # Find body attachment and type my ($textbody, $htmlbody, $body) = &find_body($mail, $userconfig{'view_html'}); $body = $htmlbody if ($in{'body'} == 2); @@ -247,10 +256,13 @@ my $image_mode = int(defined($in{'images'}) ? $in{'images'} : $userconfig{'view_images'}); my @bodyright; my $bodycontents; +my $calendars = &get_calendar_data(\@calendars); if ($body && $body->{'data'} =~ /\S/) { if ($body eq $textbody) { # Show plain text $bodycontents = "
";
+		$bodycontents .= $calendars->{'text'}
+			if ($calendars->{'text'});
 		foreach my $l (&wrap_lines(&eucconv($body->{'data'}),
 					$userconfig{'wrap_width'})) {
 			$bodycontents .= &link_urls_and_escape($l,
@@ -264,7 +276,9 @@ if ($body && $body->{'data'} =~ /\S/) {
 		}
 	elsif ($body eq $htmlbody) {
 		# Attempt to show HTML
-		$bodycontents = $body->{'data'};
+		$bodycontents = $calendars->{'html'}
+			if ($calendars->{'html'});
+		$bodycontents .= $body->{'data'};
 		my @imageurls;
 		$bodycontents = &disable_html_images($bodycontents, $image_mode,
 						     \@imageurls);
diff --git a/makerpm.pl b/makerpm.pl
index bdfe6403..6e503584 100755
--- a/makerpm.pl
+++ b/makerpm.pl
@@ -78,7 +78,7 @@
 Provides: %{name}-%{version}
 Requires(pre): /bin/sh /usr/bin/perl
 Requires: /bin/sh /usr/bin/perl perl(lib) perl(open) perl(Net::SSLeay) perl(Time::Local) perl(Data::Dumper) perl(File::Path) perl(File::Basename) perl(Digest::SHA) perl(Digest::MD5) openssl unzip tar gzip
-Recommends: perl(DateTime) perl(DateTime::TimeZone) perl(DateTime::Locale) perl(Time::Piece) perl(Encode::Detect) perl(Time::HiRes) lynx shared-mime-info perl-File-Basename perl-File-Path
+Recommends: perl(DateTime) perl(DateTime::TimeZone) perl(DateTime::Locale) perl(Time::Piece) perl(Encode::Detect) perl(Time::HiRes) perl(Socket6) lynx shared-mime-info perl-File-Basename perl-File-Path
 AutoReq: 0
 License: BSD-3-clause
 Group: System/Tools