lib/classes/Swift/Mime/SimpleMessage.php
public function detach(Swift_Mime_SimpleMimeEntity $entity)
    {
        $newChildren = [];
        foreach ($this->getChildren() as $child) {
            if ($entity !== $child) {
                $newChildren[] = $child;
            }
        }
        $this->setChildren($newChildren);

        return $this;
    }
public function detach(Swift_Mime_SimpleMimeEntity $entity)
    {
        $newChildren = [];
        foreach ($this->getChildren() as $child) {
            if ($entity !== $child) {
                $newChildren[] = $child;
            }
        }
        $this->setChildren($newChildren);

        return $this;
    }
public function detach ( Swift_Mime_SimpleMimeEntity $ entity ) { $ newChildren = [ ] ; foreach ( $ this -> getChildren ( ) as $ child ) { if ( $ entity !== $ child ) { $ newChildren [ ] = $ child ; } } $ this -> setChildren ( $ newChildren ) ; return $ this ; }
Remove an already attached entity.

@return $this
Remove an already attached entity .