use Email::Folder::Exchange::EWS; use URI; use LWP::UserAgent; my $folder = Email::Folder::Exchange::EWS->new('https://owa.webmail.com', 'domain\user_name', 'password'); my $unread_count = $folder->unread_count(); my $total_count = $folder->total_count(); my $child_folders = $folder->child_folder_count(); my $folder_name = $folder->display_name(); print "Unread MSG Count -- $unread_count\n"; print "Total MSG Count -- $total_count\n"; print "child folders -- $child_folders\n"; print "Folder Name -- $folder_name\n"; for my $message ($folder->messages) { print $message->header('Subject')."\n"; my $txt = $message->body; print "$txt\n"; }