我正在使用PHP脚本来读取和解析发送到共享邮箱的错误日志。
我正在使用imap_open()进行连接。
如果我使用以下凭据连接到自己的邮箱,则可以正常工作
server: {outlook.office365.com:993/imap/ssl}
username: myname@domain.com
password: mypas$word
Run Code Online (Sandbox Code Playgroud)
但是,如果我想使用以下凭据连接到sared邮箱,则会收到错误消息
server: {outlook.office365.com:993/imap/ssl}
username: myname@domain.com\shared-folder@domain.com
password: mypas$word
Run Code Online (Sandbox Code Playgroud)
错误如下: User is authenticated but not connected. (errflg=2)
根据我的研究,这意味着我使用了错误的密码,但是由于该密码在连接到我自己的收件箱时有效,因此不会错
我100%确定我的帐户可以访问共享邮箱,可以通过Office 365网络界面通过我的帐户访问它
更详细一点:我的密码包含$符号,但这没关系。我在密码上使用单引号,并且转义$符号没有帮助,即使我的个人邮箱也导致登录失败。