Kbase P138590: Sample code demonstrating the usage of the Redemption dll for Outlook
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  12/04/2011 |
|
Status: Verified
GOAL:
Sample code demonstrating the usage of the Redemption dll for Outlook
GOAL:
How to send mail from 4GL/ABL using redemption.dll
FACT(s) (Environment):
Windows
Progress 9.x
OpenEdge 10.x
FIX:
DEFINE VARIABLE cReceiver AS CHARACTER FORMAT "X(40)" .
DEFINE VARIABLE chOutlookApplication AS COM-HANDLE NO-UNDO.
DEFINE VARIABLE chNamespace AS COM-HANDLE NO-UNDO.
DEFINE VARIABLE chSafeItem AS COM-HANDLE NO-UNDO.
DEFINE VARIABLE chItem AS COM-HANDLE NO-UNDO.
cReceiver = "<email address>".
CREATE "Outlook.Application" chOutlookApplication.
CREATE "Redemption.SafeMailItem" chSafeItem.
chNamespace = chOutlookApplication:GetNamespace("MAPI") .
chNamespace:Logon.
chItem = chOutlookApplication:CreateItem(0).
chSafeItem:Item = chItem.
chSafeItem:Subject = "Testing Redemption" .
chSafeItem:Body = "Testing Redemption".
chSafeItem:Recipients:ADD(cReceiver) .
chSafeItem:SEND.
RELEASE OBJECT chOutlookApplication NO-ERROR.
RELEASE OBJECT chNamespace NO-ERROR.
RELEASE OBJECT chSafeItem NO-ERROR.
RELEASE OBJECT chItem NO-ERROR.