PatrickTingen
New Member
We are in a process of migrating our servers and we are strugging with a mail problem.
Old server: windows server 2012R2, Progress 11.2, Outlook 2013
New server: windows server 2019 Data Center, Progress 11.7, Outlook 2019
What we do is running a progress program via the task scheduler to save mail attachments to disk. These are then picked up by another program to be processed. This works like a charm on the old server, but migrating all code to the new results in errors. The stripped version of the program is as follows:
We receive this error:
And then see this message:
We tested this in both 32 and 64 bit version of Progress. See the line with comment *ERROR* where it fails. We get the attached error. But the variables seem to have the correct value (image 2). We suspect that it has something to do with the security settings of Outlook, we checked the trust center but can't find anything that seems to be wrong, however, the program still does not work.
Any tips?
Old server: windows server 2012R2, Progress 11.2, Outlook 2013
New server: windows server 2019 Data Center, Progress 11.7, Outlook 2019
What we do is running a progress program via the task scheduler to save mail attachments to disk. These are then picked up by another program to be processed. This works like a charm on the old server, but migrating all code to the new results in errors. The stripped version of the program is as follows:
Code:
DEFINE VARIABLE hOutlook AS COM-HANDLE NO-UNDO.
DEFINE VARIABLE hNameSpace AS COM-HANDLE NO-UNDO.
DEFINE VARIABLE hRecipient AS COM-HANDLE NO-UNDO.
DEFINE VARIABLE hInbox AS COM-HANDLE NO-UNDO.
DEFINE VARIABLE hFolder AS COM-HANDLE NO-UNDO.
DEFINE VARIABLE cMailAccount AS CHARACTER NO-UNDO INITIAL "Productie".
DEFINE VARIABLE cFolder AS CHARACTER NO-UNDO INITIAL "Orders".
&GLOBAL-DEFINE olFolderInbox 6
/* Start Outlook */
CREATE "Outlook.Application" hOutlook.
IF NOT VALID-HANDLE(hOutlook) OR ERROR-STATUS:ERROR THEN RETURN "Cannot start Outlook".
/* Open mailbox */
hNameSpace = hOutlook:GetNameSpace("MAPI").
hRecipient = hNameSpace:CreateRecipient(cMailAccount) NO-ERROR.
IF NOT VALID-HANDLE(hRecipient) OR ERROR-STATUS:ERROR THEN RETURN "Cannot init recipient".
hRecipient:resolve().
/* Find inbox */
hInbox = hNameSpace:GetSharedDefaultFolder(hRecipient, {&olFolderInbox}) NO-ERROR.
IF NOT VALID-HANDLE(hInbox) THEN RETURN "Cannot find inbox".
/* Find "Orders" folder in the inbox */
hFolder = hInbox:Folders(cFolder). /* [B]*ERROR*[/B] */
MESSAGE
"hInbox: " hInbox SKIP
"hInbox:Folders " hInbox:Folders SKIP
"hInbox.FolderPath" hInbox:FolderPath VIEW-AS ALERT-BOX INFORMATION BUTTONS OK.
We receive this error:
And then see this message:
We tested this in both 32 and 64 bit version of Progress. See the line with comment *ERROR* where it fails. We get the attached error. But the variables seem to have the correct value (image 2). We suspect that it has something to do with the security settings of Outlook, we checked the trust center but can't find anything that seems to be wrong, however, the program still does not work.
Any tips?
Last edited: