A Windows update downloaded yesterday ("Feature update to Windows 10, version 1709") has broken Redemption code for sending mail. The simplified code is:
OutlookApp := GetActiveOleObject(Outlook_Application_Class);
OLNameSpace := OutlookApp.GetNameSpace(MAPI_NAMESPACE);
OLNameSpace.Logon;
myOutlookItem := OutlookApp.CreateItem(olMailItem);
myItem := CreateOLEObject(Redemption_SafeMailItem_Class);
myItem.Item := myOutlookItem;
myRecipient := myItem.Recipients.Add(toRecipient); // <---- 'test@testing.com'
myRecipient.Type := olTo;
myItem.Recipients.ResolveAll; // <----------- myItem.Recipient count = 0
myItem.Subject := AMessage_Subject;
myItem.Body := AMessage_Body;
myItem.Send; // <--- ERROR: Error in IMessage.SubmitMessage: MAPI_E_NO_RECIPIENTS
If I do not use Redemption it works correctly.
If I change myItem.Recipients.Add to myOutlookItem.Recipients.Add, I get MAPI_E_AMBIGUOUS_RECIP
Have also tried:
Any suggestions on what to try next?
Thanks
Windows update is known to wipe out some registry keys responsible for MAPI marshalling. You can try to install the registry fix from https://groups.yahoo.com/neo/groups/Outlook-Redemption/conversations/topics/9600 or try to reinstall Outlook.