Browse Source

get meta info for email msgs

pull/1/head
Friendika 11 years ago
parent
commit
c7bcdf0c18
  1. 11
      include/email.php

11
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:

Loading…
Cancel
Save