- /**
- * @brief Check addons, not called from main friendica project
- * I don't see it in addons either
- */
- function email_msg_headers($mbox, $uid) {
- $raw_header = (($mbox && $uid) ? @imap_fetchheader($mbox,$uid,FT_UID) : '');
- $raw_header = str_replace("\r",'',$raw_header);
- $ret = array();
- $h = explode("\n",$raw_header);
- if (count($h))
- foreach ($h as $line ) {
- if (preg_match("/^[a-zA-Z]/", $line)) {
- $key = substr($line,0,strpos($line,':'));
- $value = substr($line,strpos($line,':')+1);
-
- $last_entry = strtolower($key);
- $ret[$last_entry] = trim($value);
- }
- else {
- $ret[$last_entry] .= ' ' . trim($line);
- }
- }
- return $ret;
- }
-