aboutsummaryrefslogtreecommitdiffstats
path: root/include/email.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-05-19 17:25:41 -0700
committerFriendika <info@friendika.com>2011-05-19 17:25:41 -0700
commit44d5c90af446537ddd292caff0cd85370a7339ab (patch)
tree263060ed73c7a9830e3b63e95782eca02a17a38d /include/email.php
parentf151565029162c1de258eaef7fc8aacd4f69ba47 (diff)
downloadvolse-hubzilla-44d5c90af446537ddd292caff0cd85370a7339ab.tar.gz
volse-hubzilla-44d5c90af446537ddd292caff0cd85370a7339ab.tar.bz2
volse-hubzilla-44d5c90af446537ddd292caff0cd85370a7339ab.zip
better mailing list support, email addr can be either 'from' or 'to'
Diffstat (limited to 'include/email.php')
-rw-r--r--include/email.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/include/email.php b/include/email.php
index db10af2ee..7e0351e94 100644
--- a/include/email.php
+++ b/include/email.php
@@ -15,7 +15,17 @@ function email_poll($mbox,$email_addr) {
return array();;
$search = imap_search($mbox,'FROM "' . $email_addr . '"', SE_UID);
- return (($search) ? $search : array());
+
+ $search2 = imap_search($mbox,'TO "' . $email_addr . '"', SE_UID);
+
+ if($search && $search2)
+ $res = array_merge($search,$search2);
+ elseif($search)
+ $res = $search;
+ else
+ $res = $search2;
+
+ return (($res) ? $res : array());
}