是否可以将OAuth 2.0用于Office365 SMTP? [英] Is it possible to use OAuth 2.0 for Office365 SMTP?

查看:433
本文介绍了是否可以将OAuth 2.0用于Office365 SMTP?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个电子邮件应用程序,用于发送内部编写的电子邮件.我们为它设置了选项,使其可以将OAuth 2.0与GMail(个人和企业帐户)和Outlook.com帐户一起使用而不会出现问题.

I have an email application for sending emails that was written in house. We have set it with the option to use OAuth 2.0 with GMail (personal and business accounts) and Outlook.com accounts without issues.

我们还可以使用用户ID和密码进行身份验证,但是我们更喜欢OAuth 2.0,因为我们不会以任何方式保存密码.

We can also authentication with user ids and passwords but we prefer OAuth 2.0 as we don't save passwords anywhere that way.

我们现在有要求对Office365帐户执行此操作.

We now have requests to do this for Office365 accounts.

我注意到Office365 smtp服务器(smtp.office365.com端口587)上的问候消息不提供XOAUTH2选项.

I notice that the hello message on the Office365 smtp server (smtp.office365.com port 587) does not offer the XOAUTH2 option.

250-BY2PR0601CA0005.outlook.office365.com Hello [xx.xx.xx.xx]
250-SIZE 157286400
250-PIPELINING
250-DSN
250-ENHANCEDSTATUSCODES
250-AUTH LOGIN
250-8BITMIME
250-BINARYMIME
250 CHUNKING

但是,Outlook.com的SMTP服务器可以:

But, the SMTP server for outlook.com does:

250-BLU436-SMTP14.smtp.hotmail.com Hello [xx.xx.xx.xx]
250-TURN
250-SIZE 41943040
250-ETRN
250-PIPELINING
250-DSN
250-ENHANCEDSTATUSCODES
250-8bitmime
250-BINARYMIME
250-CHUNKING
250-VRFY
250-AUTH LOGIN PLAIN XOAUTH2
250 OK

这可能与Office365有关吗?如果没有,我们是否可以将Office365用户指向Outlook.com SMTP服务器(smtp-mail.outlook.com)还是完全不同?

Is this possible to do with Office365? If not, can we point Office365 users to the outlook.com smtp server (smtp-mail.outlook.com) or are they totally different?

如果可能的话,我们宁愿不要仅将API用于发送电子邮件,因为每个提供商的RESTful API肯定会大不相同.

We'd rather not use the APIs just for sending emails if possible as the RESTful APIs for each provider will of course be quite different.

通过Office365帐户发送电子邮件时使用OAuth 2.0的原因是我们不需要在服务器上存储密码.另外,如果用户更改了密码,除非他们告诉我们或在系统端手动更新密码,否则我们不会知道.

The reason for using OAuth 2.0 when sending email with an Office365 account is that we don't want to have to store passwords on our server. Also, if the user changes their password, we won't know unless they tell us or manually update it on our system side.

使用OAuth 2.0可以解决此问题,并允许应用程序像其他电子邮件提供商一样顺畅地流动.

Using OAuth 2.0 this would solve this problem and allow the application to flow like with other email providers.

推荐答案

真的也想要此功能.这将使需要发送邮件的Office365应用变得容易得多!

I really wanted this feature too. It would make Office365 apps that need to send mail that much easier!

我做了一些狩猎,发现似乎与我们将要获得的官方答案非常接近(答案是一个固定的数字).

I did some hunting, and found this which appears to be as close to an official answer as we are going to get (and the answer is a flat no).

这篇关于是否可以将OAuth 2.0用于Office365 SMTP?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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