aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-04-16 01:14:25 -0700
committerFriendika <info@friendika.com>2011-04-16 01:14:25 -0700
commitc7bcdf0c186c8d5ce278a3710a5ba570d066be99 (patch)
tree3bbd36c39a04925db85d81ba57b4222e4207e889
parent27cbb830a7bd72f13181acc5999a6bed4f74f5ae (diff)
downloadvolse-hubzilla-c7bcdf0c186c8d5ce278a3710a5ba570d066be99.tar.gz
volse-hubzilla-c7bcdf0c186c8d5ce278a3710a5ba570d066be99.tar.bz2
volse-hubzilla-c7bcdf0c186c8d5ce278a3710a5ba570d066be99.zip
get meta info for email msgs
-rw-r--r--include/email.php11
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: