通过Windows窗体应用程序从在线交流(Office 365)中阅读电子邮件 [英] Read emails from exchange online (Office 365) through windows forms application

查看:117
本文介绍了通过Windows窗体应用程序从在线交流(Office 365)中阅读电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试通过Windows窗体应用程序从O365邮箱中读取电子邮件.我希望我的应用程序使用我的用户名和密码从O365邮箱中读取电子邮件. 是否可以在不在Azure上注册应用程序的情况下访问O365 api? (仅使用用户凭据)

I am trying to read emails from my O365 mailbox through a windows forms application. I want my application to read emails from O365 mailbox using my username and password. Is it possible to access the O365 api without registering the application on the Azure? (only using user credentials)

我在msdn上关注了这篇文章, https://msdn.microsoft.com/zh-CN/library/office/dn567668(v = exchg.150).aspx 我在这一行有一个问题:

I followed this article on msdn, https://msdn.microsoft.com/en-us/library/office/dn567668(v=exchg.150).aspx I have an issue in this line:

result = context.AcquireToken(resourceId, ClientID, _returnUri); // parameters are no longer valid in this method

推荐答案

是的,您可以使用

Yes, you can do with with Exchange web service API. It is designed for client application. Follow the link, you can find a lot of examples.

一个注意事项是:要创建服务客户端,您需要指定Exchange Server的版本,该版本应为ExchangeVersion.Exchange2013_SP1以进行在线交换.

One note is: to create the service client, you need specify the version of the Exchange Server, it should be ExchangeVersion.Exchange2013_SP1 for exchange online.

ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2013_SP1);

这篇关于通过Windows窗体应用程序从在线交流(Office 365)中阅读电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆