Some strange behaviour with Outlook, Google Workspace and Sent Items

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

Some strange behaviour with Outlook, Google Workspace and Sent Items
 
Pino Carafa




Posts: 162
Joined: 2016-09-28
Hello Add-in Express. At this point I'm not really looking for a "solution", I'm more interested in whether you have heard about issues with using Outlook and Google Workspace, and addins.

We are experiencing two issues with Google Workspace:

(Please don't ask WHY.... LOL) - When the user sends an email and it needs to be processed by our add-in we create a copy of the email in the Sent Items folder. We construct that .msg file using a product called Aspose and it allows us to do some Super Secret Stuff That We Cannot Share With The World *smiles*. It isn't really relevant as it works fine for us. We then set the DeleteAfterSubmit property on the email that is still in the process of being sent, and all is fine. The processed email is stored in the user's Sent Items folder, the email that is actually sent is deleted, so as far as the user is concerned they sent one email and one Sent Item is added to the Sent Items folder and all "works as it should".

But we got a new customer who is using a new product Google Workspace Sync which then allows them to set an Outlook profile that integrates with Google Workspace. The add-in is still doing all the important stuff it needs to do, but something is funny.

1) In the Sent Items we now see TWO copies of the sent item. So I am guessing that Google Workspace doesn't honour the DeleteAfterSubmit property.

2) Sometimes (NOT always) a copy of the Sent Item appears in the user's INBOX.

So all I'd like to know at this point is... have you heard about strange issues like these in Addins when the user uses this Google Workspace Sync stuff?
Posted 19 Oct, 2022 09:38:07 Top
Pino Carafa




Posts: 162
Joined: 2016-09-28
After further investigation I found that while Google Workspace doesn't appear to honour the .DeleteAfterSubmit property, it also doesn't seem to suffer from the synchronisation issues that we were having between the Outlook front end and the Outlook 365 backend.

So our solution is simple: we check whether the user is on Google Workspace. If they are on Google Workspace we do NOT create a copy in the Sent Items, and we do NOT set the .DeleteAfterSubmit property on the actual sent item - at the moment this has no effect but what if Google Workspace decides to start honouring this property at some point in the future, right?

The result: It no longer shows two copies in the Sent Items folder, and since then we also haven't seen the item appear in the user's Inbox. We still have no idea what was causing the latter, but this appears to have helped.

So for us this issue is resolved, but if anybody can add some words of wisdom to give us some insight on what might be happening "under the hood" (i.e. at the Google Workspace "server side" of things), please do share :-)
Posted 20 Oct, 2022 04:00:18 Top
Andrei Smolin


Add-in Express team


Posts: 18827
Joined: 2006-05-11
Hello Pino,

Thank you for providing a solution!

We haven't heard of problems with Google Workspace. However, we remember problems with IMAP-based GMail stores; not sure if these relate.

Maybe, the issue is reflected in mail items generated in Sync Issues and Sync Issues | Conflicts folder? If so, see https://www.add-in-express.com/creating-addins-blog/2020/02/26/solve-synchronization-conflict-when-modifying-outlook-item-itemadd-event/.

Regards from Poland (CEST),

Andrei Smolin
Add-in Express Team Leader
Posted 20 Oct, 2022 04:54:32 Top
Pino Carafa




Posts: 162
Joined: 2016-09-28
Yes indeed, that's an article we heavily referenced when we came up with our other solution. As the article suggests we are now making changes in the ItemSend event and we are NOT setting user properties in the Item that is being sent. Instead we create a .msg file copy of the item and set the properties in there, and then Move the copy of the item to the Sent Items. Because that is not "really" an item that Outlook is sending out, it doesn't have any of these problems. Then on the "real" Item that is referenced in the ItemSend event we set the .DeleteAfterSubmit property and outlook then kindly removes it from the Sent Items once it appears there. Because we save an identical looking copy in there, the user will never know that we "pulled a fast one".

Which worked fine with Exchange or Outlook 365, but not for Google Workspace and thankfully we found a solution for that, too.
Posted 20 Oct, 2022 09:49:22 Top
Andrei Smolin


Add-in Express team


Posts: 18827
Joined: 2006-05-11
That's great! My congratulations!

Regards from Poland (CEST),

Andrei Smolin
Add-in Express Team Leader
Posted 20 Oct, 2022 10:04:05 Top