How can i detect a new e-mail arrival using GraphClientServer
I'm using Microsoft's outlook service through their graph library
Microsoft.Graph.
I make a login request in an API and they send a security code to my company's email
I got stuck in the part of fetching my mailbox trying to find the security code e-mail.
Is there a common way of doing it? I was thinking about requesting the mail count in the inbox and loop wait until something happens. I looked through the docs and didn't find anything about an event-like thing
3 Replies
the security code e-mail generally takes 1 minute to arrive
I don't know about
Microsoft.Graph
, but every mail has an unique id; you could crossechck by this id.current working solution is as follows