Home > Software design >  Outlook Application wont send mails every second instance
Outlook Application wont send mails every second instance

Time:11-16

I know I should probably ask MS about this, but I dont know if I trust their communication tools to get me a satisfying answer.

I have recently taken the task to test an application of mine. Part of this test is to send an e-mail to it, then log in and see if I get the result I want (this is automated)

For this the process is:

  1. Open Outlook -> Send Mail
  2. Close Outlook
  3. Open App -> Check result
  4. Open Outlook -> Send Mail
  5. Close Outlook

But for some reason, every second time the outlook app is opened, (including manually opening the app to check on configurations etc.) Mails will go to the outbox but will not be sent, unless I manually trigger them to.

Now, there are possible solutions like keeping the app running continously, or telling my testing-suite to press F9 after every sent mail, but I want to tackle the root cause, and fix the underlying problem.

The Outlook Version used is the latest Version of Office 365 Outlook.

Has anyone else had this experience and figured out a fix? Thank you in advance.

CodePudding user response:

Keep in mind that message submission is an asynchronous process, so if you close Outlook while it is still sending, the message might end up stuck in the Outbox. You can call Namespace.SendAndReceive to force submission, but it is still asynchronous. You can hook into the SyncObject.SyncEnd event on the first (All Accounts) SyncObject from the Namespace.SyncObjects collection and quite only after that event fires.

CodePudding user response:

Since this problem occured on a machine I do not own, I tried avoiding certain easy troubleshooting steps. After I couldnt find an answer on my own, and I didnt get responses here that would've helped me solve this without a wooden hammer method, I asked for permission to issue a repair to the local office 365 suite.

After the repair it had redownloaded and installed the entirety of office 365. After connecting my company MS account to outlook, the issue no longer appeared.

I guess this counts as solving this issue.

  • Related