/**
  * Adds the part $part to the list of multipart messages.
  *
  * This method is called automatically by ezcMailMultipartParser
  * each time a part is parsed.
  *
  * @param ezcMailPart $part
  */
 public function partDone(ezcMailPart $part)
 {
     // TODO: support Content-Type: start= as specified by RFC 2387
     if (!$this->part->getMainPart()) {
         $this->part->setMainPart($part);
         return;
     }
     $this->part->addRelatedPart($part);
 }
Example #2
0
 public function testInvalidGetMultipartRelatedByID()
 {
     $part = new ezcMailMultipartRelated();
     $part->setMainPart($main = new ezcMailText('a'));
     $this->assertEquals($main, $part->getMainPart());
     $part->addRelatedPart(new ezcMailText('a'));
     $this->assertEquals(false, $part->getRelatedPartByID('no such id'));
 }