Custom IMAP command in php

后端 未结 3 1367
执念已碎
执念已碎 2021-01-14 02:13

What is alternative of java imap function doCommand in php ?

I want to fire some custom imap extension command but I don\'t find any function to do that

3条回答
  •  被撕碎了的回忆
    2021-01-14 03:05

    I have switched to zend imap. it supports custom command and fetch.

    which solved my problem.

    login($user, $pass);
    $protocol->select('INBOX');
    $storage = new Zend_Mail_Storage_Imap($protocol);
    foreach ($storage as $messageId => $message) {
      $id = $protocol->fetch('Custom Attribute', $storage->getUniqueId($messageId));
      echo "Mail from '{$message->from}': {$message->subject} : Custom Attribute $id \n";
    }
    ?>
    

提交回复
热议问题