Redemption, SafeMailItem and ActivePerl

B

Brian Rankin

Trying to import an RFC822 message into a PST message store results in
the error "Can't modify non-lvalue subroutine call" when I set the
Redemption item equal to the new message item. My code (the line
where the error occurs is tagged):

## redemption testing
Win32::OLE::CreateObject("Redemption.SafeMailItem",
$RedemptionSession);
$MAPISession->Logon("tester1",undef,"False",undef);
$cnt = $MAPISession->Infostores->Count;
STORES: for ($i = 1; $i<$cnt + 1; $i++) {
$pststore = $MAPISession->Infostores($i);
$namer = $pststore->Name;
print "$namer\n";
if ($namer eq "Personal Folders") { last STORES; }
}
$pstinbox = $pststore->RootFolder->Folders->Item("DEFAULT");
$newmsg = $pstinbox->messages->Add;
$newmsg->update;
ERROR: $RedemptionSession->Item = $newmsg;
$RedemptionSession->Import("c:\pstconverter\tester.eml",olRFC822);
$RedemptionSession->save;

As far as I can tell, the $RedemptionSession object is fine...any
suggestions appreciated.

Regards, Brian
 
J

Jay Tilton

(e-mail address removed) (Brian Rankin) wrote:

: Trying to import an RFC822 message into a PST message store results in
: the error "Can't modify non-lvalue subroutine call" when I set the
: Redemption item equal to the new message item.

: ERROR: $RedemptionSession->Item = $newmsg;

I'm not familiar with that library, but the error message and a gloss of
the docs suggest that Item is a property of the object, not a method.

$RedemptionSession->{Item} = $newmsg;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top