/**
* Send data to the browser.
*
* @throws IMP_Compose_Exception
*/
public function sendData()
{
global $browser;
if (!$this->_atc->exists()) {
throw new IMP_Exception(_("The linked attachment does not exist. It may have been deleted by the original sender or it may have expired."));
}
$data = $this->_atc->read();
$md = $this->_atc->getMetadata();
$browser->downloadHeaders($md->filename, $md->type, false, $data->length());
while (!$data->eof()) {
echo $data->substring(0, 8192);
}
$data->close();
}