doutan3463 2019-05-07 10:59
浏览 115

使用PHP中的IMAP读取日历约会(来自Office 365)

I am trying to read the calendar appointments from a shared mailbox in Office365, in particular the appointment dates.

I am able to open the mailbox, and output its contents with the following code

$con = "{outlook.office365.com:993/imap/ssl/readonly}";

$mbox = imap_open($con."Calendar", "{emailaddress}\{sharedmailbox}", "{password}");


$search = '';
$emails = imap_search($mbox,$search);

 foreach($emails as $email){

        $body = imap_fetchbody($mbox,$email,1);

        echo"<pre>";print_r($body);echo"</pre>";

 }

This outputs the following:

The server couldn't retrieve the following message:

Subject: "{subject}"
From: "{User name}")
Sent date: {Date the appointment invite was sent}

The message hasn't been deleted. You might be able to view it using either     =
Outlook or Outlook Web App. You can also contact the sender to find out wha=
t the message says.=

I need it to get the date of the appointment itself, not just the date the appointment invite was sent.

Any help would be appreciated, Thanks.

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 k8s部署jupyterlab,jupyterlab保存不了文件
    • ¥15 ubuntu虚拟机打包apk错误
    • ¥199 rust编程架构设计的方案 有偿
    • ¥15 回答4f系统的像差计算
    • ¥15 java如何提取出pdf里的文字?
    • ¥100 求三轴之间相互配合画圆以及直线的算法
    • ¥100 c语言,请帮蒟蒻写一个题的范例作参考
    • ¥15 名为“Product”的列已属于此 DataTable
    • ¥15 安卓adb backup备份应用数据失败
    • ¥15 eclipse运行项目时遇到的问题