Last active
December 21, 2015 20:59
-
-
Save tpokorra/6365202 to your computer and use it in GitHub Desktop.
testing the imap flags and acl permissions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// centos: yum install php-imap | |
$host="localhost"; | |
$mbox = imap_open("{".$host.":993/imap/ssl/novalidate-cert}INBOX", "[email protected]", "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^[email protected]', "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