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;
}