public function attachMemoryFile( $data, $name, $mimeType = false ) 
    {
        $this->storage->_attachments[$name] = array(
            'type'         => 'base64',
            'data'         => base64_encode( $data ),
            'content_type' => $mimeType === false ? 'application/octet-stream' : $mimeType,
        );
        $this->modified = true;
    }