duanaoreng9355
duanaoreng9355
2016-12-30 11:06
浏览 89
已采纳

通过php代码访问我的Outlook收件箱

How i can access my outlook account through my php code? I need to get the subject, from address and attachment. And then i need to mark the accessed as read on outlook. I have already accessed gmail account using IMAP but now i want to access outlook account.

Is it possible?

Any help will be appreciated.

图片转代码服务由CSDN问答提供 功能建议

我如何通过我的PHP代码访问我的Outlook帐户? 我需要从地址和附件中获取主题。 然后我需要将访问标记为Outlook上的读取标记。 我已经使用IMAP访问了gmail帐户,但现在我想访问Outlook帐户。

有可能吗?

我们将不胜感激任何帮助。

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • doudiewen9435
    doudiewen9435 2017-01-04 04:07
    已采纳

    Finally i got a solution, i can access the outlook account using IMAP in PHP.

    $hostname = '{outlook.office365.com:993/imap/ssl/novalidate-cert}INBOX';
        $username = 'username';
        $password = 'password'; 
    
    /* try to connect */
    $inbox = imap_open($hostname,$username,$password) or die('Cannot connect to '.$hostname.': ' . imap_last_error()); 
    
    点赞 评论

相关推荐