Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
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 +"; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Read outlook email with redemption not quite working
by Anonymous Monk on Jul 21, 2005 at 16:30 UTC | |
by Anonymous Monk on Jul 22, 2005 at 08:18 UTC |