Hi,
We have an application that sends appointments through MS Outlook using redemption to suppress the security warnings.
Unfortunately, we seem to have a problem of items sitting in Outbox and not sent right away.
We tried this code
This was the original code (I added a check for TotalItems - it was creating ~700 or more tasks in Outlook and eventually bringing the system down)
So, do you know if there is an elegant way to force items out right away?
Thanks.
We have an application that sends appointments through MS Outlook using redemption to suppress the security warnings.
Unfortunately, we seem to have a problem of items sitting in Outbox and not sent right away.
We tried this code
Code:
loFolder = loNameSpace.GetDefaultfolder(4) && Go to Outbox, folder 4
*This was the first try - didn't work and even introduced a *security warning message back
* loSend = loFolder.Items(1).Send && Send waiting items
* Tried this - no security message, but no effect either
loNameSpace.SyncObjects.Item(1).Start()
This was the original code (I added a check for TotalItems - it was creating ~700 or more tasks in Outlook and eventually bringing the system down)
Code:
*!* ltSendStartTime=DATETIME()
*!* lnTotalItems = 0
*!* DO WHILE loFolder.Items.Count>0 AND DATETIME()-ltSendStartTime<10
*!* * Force delivery
*!* FOR lnIndex=1 TO loNameSpace.SyncObjects.Count
*!* loNameSpace.SyncObjects.Item(lnIndex).Start()
*!* IF lnTotalItems > 100
*!* EXIT
*!* ENDIF
*!*
*!* lnTotalItems = lnTotalItems + 1
*!* ENDFOR
*!* IF lnTotalItems > 100
*!* EXIT
*!* ENDIF
*!* ENDDO
*!*
*!* =MESSAGEBOX("Number of items we're sending " + TRANSFORM(lnTotalItems))
So, do you know if there is an elegant way to force items out right away?
Thanks.