+ } else if ($this->type1 == 'related') { /* RFC 2387 */
+ $msgs = $this->findRelatedEntity();
+ foreach ($msgs as $msg) {
+ if (count($msg->entities) == 0) {
+ $entity[] = $msg->entity_id;
+ } else {
+ $entity = $msg->findDisplayEntity($entity, $alt_order, $strict);
+ }
+ }
+ if (count($msgs) > 0) {
+ $found = true;
+ }
+ } else { /* Treat as multipart/mixed */
+ foreach ($this->entities as $ent) {
+ if(strtolower($ent->header->disposition->name) != 'attachment' &&
+ ($ent->type0 != 'message' && $ent->type1 != 'rfc822'))
+ {
+ $entity = $ent->findDisplayEntity($entity, $alt_order, $strict);
+ $found = true;
+ }
+ }