如何更轻松地通过PHP访问Office 365电子邮件?

huangapple go评论74阅读模式
英文:

Any tips to access office 365 email via PHP easier?

问题

我一直在使用PHP访问来自Office 365的电子邮件,但电子邮件本身来自Gabohost(godaddy):

$mbox = imap_open(" {outlook.office365.com:993/imap/ssl}INBOX"

几天前,Gabohost写道他们将不再允许“基本身份验证”。所以我查了一下在线资料,从1行代码到50行来访问电子邮件似乎太多了。

所以我想问一下,除了使用第三方工具之外,我真的必须在Microsoft开发者平台创建一个应用程序,并使用相当庞大的代码来访问电子邮件吗?
没有更简单的方法吗?:/
我只需要能够阅读、删除和移动邮件(不发送)。

非常感谢各位提前的帮助。

英文:

I been using PHP to access my email from Office 365 but the email it self is from Gabohost (godaddy):

$mbox = imap_open( "{outlook.office365.com:993/imap/ssl}INBOX"

Few days ago, Gabohost wrote that they no longer will be allowing "Basic Authentication".
So I've checked online and holy ___ going from 1 line code to 50 to access e-mail seems a lot.

So I just wanted to ask, without using 3rd party tools etc, I REALLY have to create an app on microsoft dev and use pretty chunky codes to access email from now on?
There's no easier way? :/
I only need to be able to Read, delete & move emails (not send).

Thanks a lot in advance guys

答案1

得分: 2

你可以考虑使用Graph API,详细信息请参阅使用Microsoft Graph API

Microsoft已禁用了POP/IMAP帐户的基本身份验证协议,请在Exchange Online中的基本身份验证弃用 - 2022年9月更新 - Microsoft社区中心文章中了解更多信息。

英文:

You may consider using the Graph API instead, see Use the Microsoft Graph API for more information.

Microsoft has disabled basic auth protocol for POP/IMAP accounts, read more about that in the Basic Authentication Deprecation in Exchange Online – September 2022 Update - Microsoft Community Hub article.

答案2

得分: 1

是的,无论您使用什么 - IMAP4、Graph还是其他任何东西 - 基本身份验证都将不再可用。OAuth是唯一的方法。

英文:

Yes, no matter what you use - IMAP4, Graph, or anything else - Basic auth is going away. OAuth is the one and only way.

huangapple
  • 本文由 发表于 2023年6月28日 23:51:21
  • 转载请务必保留本文链接:https://go.coder-hub.com/76574821.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定