Hi,
Does anyone know how to send an e-mail using Outlook express 6 on Windows XP (not Outlook) through a software written in ABL ?
I'm on OpenEdge 10.1.A.
When i use Outlook express 6 with this code for sending emails :
/*************************************************************************/
DEFINE INPUT PARAMETER mailAddress AS CHARACTER NO-UNDO.
DEFINE INPUT PARAMETER mailCopieCache AS CHARACTER NO-UNDO.
DEFINE VARIABLE Folder AS COM-HANDLE NO-UNDO.
DEFINE VARIABLE MailItem AS COM-HANDLE NO-UNDO.
DEFINE VARIABLE NameSpace AS COM-HANDLE NO-UNDO.
DEFINE VARIABLE Outlook AS COM-HANDLE NO-UNDO.
DEFINE VARIABLE bodyOfMessage AS CHARACTER NO-UNDO.
CREATE "outlook.Application":u outlook connect no-error.
if ERROR-STATUS:error then CREATE "outlook.Application":u outlook.
ASSIGN
NameSpace = Outlook:GetNameSpace("MAPI":U)
Folder = NameSpace:GetDefaultFolder(6).
ASSIGN
MailItem = Folder:Items:Add()
MailItem:To = TRIM(mailAddress)
MailItem:Bcc = TRIM(mailCopieCache)
MailItem:Body = "Test message".
/*-- Envoi de l'e-mail --*/
MailItem:SEND().
/*-- Réallocation de mémoire : suppresion des COM-HANDLE Outlook --*/
IF VALID-HANDLE(MailItem) THEN
RELEASE OBJECT MailItem NO-ERROR.
IF VALID-HANDLE(Folder) THEN
RELEASE OBJECT Folder NO-ERROR.
IF VALID-HANDLE(NameSpace) THEN
RELEASE OBJECT NameSpace NO-ERROR.
IF VALID-HANDLE(Outlook) THEN
RELEASE OBJECT Outlook NO-ERROR.
/******************************************************************/
I have this message :
"Automation server for Outlook.Application is not registered. Set up this server and try again (5893)."
Have you ever seen this kind of message ?
Thanks
Khafid1506
If you have not already check out the Knowledgebase; try search by error number:
http://progress.atgnow.com/esprogress/openPromsg.do
Otherwise you may want to open a call with Technical Support.
It's not a Progress issue - it's an Outlook Express issue. Outlook Express does not support being used as an automation server. CREATE "Outlook.Application" does only work with (the real) Outlook as an automation server.
I suggest sending emails using smtpmail from freeframework.org
Thanks a lot.