![]() ![]() Key: HKEY_CURRENT_USER\Software\Microsoft\Office\x.0\Outlook\Options\Mail This setting is tied to the following registry data, so this setting can also be configured by an administrator through a modification of the registry. This problem can occur if the Send immediately when connected option is not enabled, as shown in the following figure from Outlook 2016. "Do you wish to synchronize " & syc.Name &"?", vbYesNo) Set nsp = Application.GetNamespace("MAPI") You can use the Start method of the SyncObject class to begin synchronizing a user's folders using the specified Send\Receive group if it is not perfomed automatically. What am I missing? Is it possible at all to ensure mail is being sent if Outlook has not been running in advance? But it doesn't work: when Outlook has not already been running, MailItem is stuck in outbox. Problem: after the user clicks Send, mail is stuck in outbox when Outlook is not already running before MailItem is created.Īs described here, use of SyncObject should avoid this issue. ") Īfter user clicks on Send the output is MailItem_Close. SyncObject.SyncEnd += SyncObject_SyncEnd Ĭonsole.WriteLine("SyncObject_SyncEnd. MailSentEvent = new AutoResetEvent(false) ((InspectorEvents_10_Event)inspector).Close += MailItem_Close MailItem mailItem = outlook.CreateItem(OlItemType.olMailItem)) NameSpace ns = outlook.GetNameSpace("MAPI") I create a MailItem like following: Application outlook = new Application()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |