I have an .Net 4.6 app processing mail from inbox. We are migrating an old windows server to a new one. The app runs interactively or via task scheduler. App is using Redemtpion 6.0, upgraded yesterday from v4.5.
On Windows Server 2008 R2 + Outlook 2013 runs OK. On Windows Server 2016 + Outlook 2016 runs OK. On Windows Server 2019 + Outlook 2019 runs interactively byt not via task scheduler. When executing GetDefaultFolder(olFolderInbox) an MAPI_E_NOT_FOUND exception is thrown and the program crashes. When the user is logged on the server, even disconected, the app run via task scheduler works.
I found a similar problem here Redemption: Error when using Task Scheduler. According to the comments it should not work via task scheduler, but it works on Windows Server 2016 with Outlook 2016.