J
John Norman
I'm trying to get around the Outlook security warning by using
Redemption but I'm stuck with the initialization and usage of the
Redemption object with BCB5.
Code:
---
OutlookApplication1->Connect();
NameSpacePtr pNameSpace =
OutlookApplication1->GetNamespace(WideString("MAPI"));
MailItemPtr pNewMail = OutlookApplication1->CreateItem(olMailItem);
Variant repMail = CreateOleObject("Redemption.SafeMailItem");
repMail.Item = pNewMail; >>>> Fails with "Item no member of Variant"
repMail->Subject = WideString("Automation test");
repMail->To = WideString("(e-mail address removed)");
repMail->Recipients->ResolveAll();
repMail->Send();
// Working fine with Outlook object
//pNewMail->Subject = WideString("Automation test");
//pNewMail->To = WideString("(e-mail address removed)");
//pNewMail->Recipients->ResolveAll();
//pNewMail->Send();
OutlookApplication1->Disconnect();
---
How do I access the Redemption Item object? I noticed Variant is
working with Deplhi, but I'm not sure how this works with BCB.
Thanks,
John N.
- Using Borland CBuilder 5/Outlook XP/Exchange 2000 server -
Redemption but I'm stuck with the initialization and usage of the
Redemption object with BCB5.
Code:
---
OutlookApplication1->Connect();
NameSpacePtr pNameSpace =
OutlookApplication1->GetNamespace(WideString("MAPI"));
MailItemPtr pNewMail = OutlookApplication1->CreateItem(olMailItem);
Variant repMail = CreateOleObject("Redemption.SafeMailItem");
repMail.Item = pNewMail; >>>> Fails with "Item no member of Variant"
repMail->Subject = WideString("Automation test");
repMail->To = WideString("(e-mail address removed)");
repMail->Recipients->ResolveAll();
repMail->Send();
// Working fine with Outlook object
//pNewMail->Subject = WideString("Automation test");
//pNewMail->To = WideString("(e-mail address removed)");
//pNewMail->Recipients->ResolveAll();
//pNewMail->Send();
OutlookApplication1->Disconnect();
---
How do I access the Redemption Item object? I noticed Variant is
working with Deplhi, but I'm not sure how this works with BCB.
Thanks,
John N.
- Using Borland CBuilder 5/Outlook XP/Exchange 2000 server -