get meta info for email msgs
This commit is contained in:
parent
27cbb830a7
commit
c7bcdf0c18
|
@ -12,10 +12,10 @@ function email_connect($mailbox,$username,$password) {
|
||||||
function email_poll($mbox,$email_addr) {
|
function email_poll($mbox,$email_addr) {
|
||||||
|
|
||||||
if(! ($mbox && $email_addr))
|
if(! ($mbox && $email_addr))
|
||||||
return false;
|
return array();;
|
||||||
|
|
||||||
$search = imap_search($mbox,'FROM "' . $email_addr . '"', SE_UID);
|
$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) {
|
function getmsg($mbox,$mid) {
|
||||||
// input $mbox = IMAP stream, $mid = message id
|
// input $mbox = IMAP stream, $mid = message id
|
||||||
// output all the following:
|
// output all the following:
|
||||||
|
|
Loading…
Reference in a new issue