I was able to succeed via a package I found called EAGetMail
. Unfortunately, I realized soon after that they have a token system and this is not a free approach.
There are a couple other choices available, like using Outlook Mail REST API
, and MimeKit
, but I'm lost on how to achieve my end result because no "start to finish" code is available on either of these references that demonstrates how to parse an Inbox for an account.
I've started to write this with the help of Mimekit
, but am not sure if this is the proper way at all.
I must imagine it looks something like:
using (var client = new SmtpClient ())
{
client.Connect("outlook.office365.com", 587);
client.Authenticate("myemail@office365account.com", "mypassword");
var message = MimeMessage.Load(stream);
}
I don't know how to setup the stream
mentioned above, and I don't know if it's possible to do this with Mimekit
and Office 365
.
I'm open to seeing a solution for this in any other approach that's not through EAGetMail
. If anyone has a lightweight solution ranging from actual establishing a connection, to pulling messages from the inbox, would be great to see!