/** * Get this message as a complete string. * * @return string */ public function toString() { if (count($children = $this->getChildren()) > 0 && $this->getBody() != '') { $this->setChildren(array_merge(array($this->_becomeMimePart()), $children)); $string = parent::toString(); $this->setChildren($children); } else { $string = parent::toString(); } return $string; }