We are using the IEWSClient Interface to connect to an Exchange Server 2016 and Exchange Server 2013.
Hi Ralf,
static void Main(string[] args)<o:p></o:p>
{
License lic = new License();
lic.SetLicense("Aspose.Total.lic");
IEWSClient client = GetExchangeEWSClient365();
var msgs = client.ListMessages();
foreach(var info in msgs)
Console.WriteLine(info.From);
Console.WriteLine("Done..");
Console.ReadKey();
}
private static IEWSClient GetExchangeEWSClient365()
{
const string mailboxUri = "https://outlook.office365.com/ews/exchange.asmx";
const string domain = @"";
const string username = @"username";
const string password = @"password";
NetworkCredential credentials = new NetworkCredential(username, password, domain);
IEWSClient client = EWSClient.GetEWSClient(mailboxUri, credentials);
return client;
}