Is a way to subscribe EWS notification like Microsoft Graph API to get the notification - exchange-server

I am new to EWS and want to find a way to subscribe EWS notification.
I build an Outlook Add-in and use Microsoft Graph API to subscribe and handle notifications for Microsoft 365 if the customer's calendar has some changes from Microsoft Graph REST APIs for mail, calendars, and contacts. But Exchange server doesn't support graph API.
Also, i read some Microsoft Documents, like Notification subscriptions, mailbox events, and EWS in Exchange. It menstions Streaming notifications. The workflow is from Service callback tokens. It's not very good as Graph API which will send the notification automatically.
So, i want to ask whether Microsoft has similar solution for Add-in on Exchange or not.

Your question is all over the place.
If you’re creating a new application at this moment I would suggest to leave EWS for what it is, and focus on Graph. My guess is that EWS won’t be around for long anymore. An other reason to use EWS is if you want to connect to on-premise Exchange servers.
Graph has support for notifications, but it’s not a connection that stays open. It works by registering a public available “callback” to which updates will be posted.

Related

Exchange server mail interceptor (connector/delivery agents/mailflow)

My basic requirement is that I need to create "something" that is capable of intercepting emails incoming/outgoing from our mail server. It cannot be an extension to mail clients. Currently we consider only exchange server. In my research I found below resources that seems to be helpful.
Mail flow and the transport
Delivery agents and Delivery Agent connectors
Transport agents
From these transport agents seems to be quite old. Now I can't figure out what's the best from the remaining options(Mail flow and the transport or Delivery agents and Delivery Agent connectors).
Whatever I develop should be able to read email get some statistics (using mail header(s), amount of attachments etc...) and store it into a custom database. Additionally add some custom headers to incoming/outgoing mails.
Can anyone point me to right direction? Should it be some kind of a service that I can install in Exchange server? (admin center->mail flow-> connectors). For example, can I write it in c# and host it like an assembly? or may be a web hook to a hosted service where Exchange will forward emails in real time etc...
I couldn't find any examples/tutorials except this
If its OnPrem Exchange and you don't have or are considering Office365 then Transport Agents would be the right thing to use. They haven't change since 2013 but are still what is used for this type of thing the last SDK was 2010 but its still valid given the lack of change on the backend https://learn.microsoft.com/en-us/previous-versions/office/developer/exchange-server-2010/dd877026(v=exchg.140)
Delivery Agents are more for when you have an external gateway that you want to send and receive messages from.

Can i trigger any actions via Exchange web services notifications or smth else?

Exchange 2010.
I've read about notification subscriptions, mailbox events, and EWS in Exchange and as i got it, the notiified client app have to stay connected to EWS all the time. Am i right?
My task looks easy - i need to trigger some action (web call most likely) when message arrives to mailbox. Is there anything for such task in EWS 2010? Is there anything like this in latest versions of Exchange Server on-prem?
For now I'm starting to think about forwarding email via trasnport rules to some unix-mta for further processing.
Yes that's correct EWS notifications require that the client application that receives the notifications stay connected if your using Stream notifications. Pull notification don't and push notifications don't but the client does need to be available to receive the heartbeat messages and then update the subscription.
There is nothing new in the later OnPrem version of Exchange there are web-hooks in Exchange Online in the Graph API

Interactive messages on slack without external service

I'm working on a simple slack bot which is supposed to ask simple questions (yes/no) and based on answers perform some actions. AFAIU I should be using interactive messages for this. The problem is that it's supposed that slack will then call some external URL with the result, but for security reasons, I can't expose any service externally.
I was hoping I can just receive some event (using Events API) from Slack that user choose one of the options and simply read it directly using API. Unfortunately I can't find anything like that.
Is possible to use interactive messages without exposing external service to the world?
Yes. If you build a bot with the Real Time Messaging API you do not need to expose an endpoint to the public Internet.
With the RTM API you open a connection to Slack (which can be from behind a firewall) and maintain that connection. There is no call-back from Slack.
However, the RTM API will only enable you to create a chat bot that can react to events and message posts. The interactive message features like buttons and drop-down menus still require you to provide an endpoint.

Exchange ActiveSync - get unseen emails count

I am writing Exchange ActiveSync client in C++. I use FolderSync command for synchronize list of folders and Sync command for synchronize emails from server.
In IMAP protocol I use command STATUS INBOX (UNSEEN) for getting unseen emails in inbox folder.
Is in Exchange ActiveSync some equivalent command ?
According to the Microsoft documentation only the following is part from ActiveSync:
Support for HTML messages
Support for follow-up flags
Conversation grouping of email messages
Ability to synchronize or not synchronize an entire conversation
Synchronization of Short Message Service (SMS) messages with a user's Exchange mailbox
Support for viewing message reply status
Support for fast message retrieval
Meeting attendee information
Enhanced Exchange Search
PIN reset
Enhanced device security through password policies
Autodiscover for over-the-air provisioning
Support for setting automatic replies when users are away, on vacation, or out of the office
Support for task synchronization
Direct Push
Support for availability information for contacts
But you might wish to implement something via EWS (see here some example).

ActiveSync sync mail with thread

I am developing MS Exchange client using active sync protocol and i have implemented all the commands, able to fetch, read mails, can also mark as unread or can delete it. But now i want to manage the emails thread wise, so i am wondering if there is any way to manage email thread. I tried to find the thread index property but there isn't such a property like gmail or other imap protocol have. So i am wondering how can i implement it.
I have referred document from https://msdn.microsoft.com/en-us/library/dd299441(v=exchg.80).aspx but didn't get exact solution from there.
If you are using protocol version 14.0 or higher (meaning that the server is Exchange 2010 or higher), each message should have a ConversationId element and a ConversationIndex that you can use to group messages. There's more information in the ActiveSync Conversations Protocol document, [MS-ASCON].

Resources