Now I get the error "Can't call method "SenderName" on unblessed reference". Can anyone tell me what's causing this eror? I really need to query outlook and get the message body once I have this working.use Win32; use Win32::OLE 'in'; my $objApp = Win32::OLE->GetActiveObject("Outlook.Application"); my $objOutlook = $objApp->GetNameSpace("MAPI"); my $objMAPIFolder = $objOutlook->GetDefaultFolder(6); foreach my $aItem (in $objOutlook->GetDefaultFolder(6)->Items +) { if ($aItem->Unread) { my $sItem = Win32::OLE->CreateObject("Redemption.SafeMail +Item"); $sItem->{Item} = $aItem; $s .= $sItem->SenderName . " -- " . $sItem->Subject . "\n +"; } }
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |