diff options
-rw-r--r-- | include/email.php | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/include/email.php b/include/email.php index c7a006da0..4d8c25edf 100644 --- a/include/email.php +++ b/include/email.php @@ -12,10 +12,10 @@ function email_connect($mailbox,$username,$password) { function email_poll($mbox,$email_addr) { if(! ($mbox && $email_addr)) - return false; + return array();; $search = imap_search($mbox,'FROM "' . $email_addr . '"', SE_UID); - return $search; + return (($search) ? $search : array()); } @@ -27,6 +27,13 @@ function construct_mailbox_name($mailacct) { } +function email_msg_meta($mbox,$uid) { + $ret = (($mbox && $uid) ? imap_fetch_overview($mbox,$uid,FT_UID) : array(array())); + return ((count($ret)) ? $ret[0] : array()); +} + + + function getmsg($mbox,$mid) { // input $mbox = IMAP stream, $mid = message id // output all the following: |