【问题标题】:PHP IMAP with Office365 mail带有 Office365 邮件的 PHP IMAP
【发布时间】:2016-08-30 09:43:20
【问题描述】:

我已针对我的问题搜索了多个 SO 主题,但找不到任何可以解决我的问题的主题。 (这里有一个类似的:Access Office356 shared mailbox with PHP

目前正在尝试将 IMAP PHP 连接到 Outlook 框,我可以成功地将 IMAP 框添加到我的邮件客户端(在 mac 中)并接收电子邮件,但使用 PHP 时我似乎无法使其正常工作。

我的代码:

$hostname = '{outlook.office365.com:993/imap/ssl}INBOX';
$username = 'email@example.com';
$password = 'password';

$inbox = imap_open($hostname,$username,$password) or die('Cannot connect to Gmail: ' . imap_last_error());

我也试过添加 novalidate-cert 等似乎没有任何区别

我得到的错误:

 imap_open(): Couldn't open stream {outlook.office365.com:993/imap/ssl}INBOX

 [ErrorException]
 imap_open(): Couldn't open stream {outlook.office365.com:993/imap/ssl/novalidate-cert}INBOX

希望任何人都能让我走上正轨。

【问题讨论】:

    标签: php email ssl outlook


    【解决方案1】:

    在 office365 中,您无法打开 IMAP for Exchange Online Kiosk License ...

    【讨论】:

      猜你喜欢
      • 2017-06-02
      • 2021-07-13
      • 2013-04-11
      • 1970-01-01
      • 1970-01-01
      • 2023-03-25
      • 2011-12-17
      • 2022-01-17
      • 1970-01-01
      相关资源
      最近更新 更多