Skip to content

Instantly share code, notes, and snippets.

@tpokorra
Last active December 21, 2015 20:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tpokorra/6365202 to your computer and use it in GitHub Desktop.
Save tpokorra/6365202 to your computer and use it in GitHub Desktop.
testing the imap flags and acl permissions
<?php
// centos: yum install php-imap
$host="localhost";
$mbox = imap_open("{".$host.":993/imap/ssl/novalidate-cert}INBOX", "admin.admin@servers.jiffybox.net", "test");
if ($mbox== null) die("mbox is null");
$folders = imap_listmailbox($mbox, "{".$host.":993}", "*");
echo "<pre>folders: ".print_r($folders,true)."</pre>";
$headers = imap_headers($mbox);
echo "<pre>headers: ".print_r($headers,true)."</pre>";
imap_setacl($mbox, 'INBOX', 'admin^admin@servers.jiffybox.net', "w");
echo "aci: <pre>".print_r(imap_getacl($mbox, 'INBOX'), true)."</pre>";
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment