#!/usr/bin/perl use warnings; use strict; use Win32::OLE; # ---------------------------------------- print "Content-type:text/html\n\n"; my $ol = Win32::OLE->new('Outlook.Application') or die "error\n"; my $olns = $ol->GetNameSpace("MAPI") or die "can't open MAPI namespace\n"; my $folder = $olns->GetDefaultFolder(9); my $items = $folder->{Items}; for my $index (1 .. $items->{Count}) { print $items->Item($index)->{Subject} . "\n"; print $items->Item($index)->{Body} . "\n"; print $items->Item($index)->{Start} . "\n"; print $items->Item($index)->{End} . "\n"; }