Monitor Outlook Email as a Windows Service Application RRS feed

  • Question

  • So, I am trying to create a windows service application to monitor my outlook inbox folder for unread emails and any emails that the subject line has a certain string of characters such as "OUT_look" it will send the email to a list of emails in my database.

    So, first questions is it possible?

    And second is if anyone knows of existing tutorials would be a great help. I am trying to use O365 REST APi's but have not been successful so far. 

    Any help would be greatly appreciated.

    P.S I have looked at a lot of existing tutorials to no success.



    Friday, May 12, 2017 10:37 AM

All replies

  • Hi adamdublin123,

    This is Visual C# forum. As your issue is related to Windows service I am moving your thread to WCF forum for getting quick response.

    Your understanding and cooperation will be grateful.

    Sabah Shariq

    [If a post helps to resolve your issue, please click the "Mark as Answer" of that post or click Answered "Vote as helpful" button of that post. By marking a post as Answered or Helpful, you help others find the answer faster. ]

    Friday, May 12, 2017 11:26 AM
  • For your issue, it could be split into two parts, interop with Outlook and develop Windows service to run first part.

    There are two ways to interop with Outlook, Outlook Object Model and Outlook Rest API.

    For operating Outlook application in Windows Service by Outlook Object Model, it is impossible.

    Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when Office is run in this environment.

    You could refer below link for more information.

    #Considerations for server-side Automation of Office  

    For Outlook Rest API, I am not familiar with it, and I would suggest you go to below forum for help about getting unread emails by O365 Rest APIS.

    If you know how to interop with Office 365 Rest, and you do not know how to develop Windows Service, please feel free to ask in this forum.

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact

    Monday, May 15, 2017 1:48 AM