Not getting all mail items when they are on the server in Office365

Add-in Express™ Support Service
That's what is more important than anything else

Not getting all mail items when they are on the server in Office365
Office365 not showing all the mail items in a folder 
Subscribe
Mike VE




Posts: 154
Joined: 2007-09-09
I have some code that iterates over the items in a mail folder that are standard emails ready to be sent when needed. Recently I have had problems because instead of returning about twenty items as expected it only returns 1. When I look at the folder in Outlook it just shows one item and a message says more are held on the server. Even if I click the button to see the mails on the server, and they appear, to code still finds only one message.


Is there a way to ensure the folder contents are up to date before my code looks through the items?
Posted 07 Jun, 2019 08:53:08 Top
Andrei Smolin


Add-in Express team


Posts: 16334
Joined: 2006-05-11
Hello Mike,

What store type do you use? Exchange? PST? IMAP Folders? Also, it looks like you scan Outbox. If so, this may prevent the emails from getting sent.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 07 Jun, 2019 09:21:28 Top
Mike VE




Posts: 154
Joined: 2007-09-09
Hi Andrei

It is Exchange store type. The folder I am looking in is a custom sub folder of the standard Drafts folder.
Posted 07 Jun, 2019 09:40:56 Top
Andrei Smolin


Add-in Express team


Posts: 16334
Joined: 2006-05-11
Hello Mike,

I would look in performing a send/receive to sync the folder and Exchange. In case you need to intercept a SyncObject event, put an ADXOutlookAppEvents component onto the add-in module and make sure the component's HandleEvents property allows handling SyncObjects events. If you do this, you need to be aware of this issue: https://social.msdn.microsoft.com/Forums/office/en-US/7a20664c-7650-4d61-9d5f-13f1d929a8cd/outlook-2013-automatic-sendreceive-doesnt-work-with-the-sample-addin-below?forum=outlookdev; it applies to the current Outlook builds as well.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 10 Jun, 2019 06:10:42 Top