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
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