/** * Get the raw message suitable for saving to the sent email folder. * * @return stream A stream contianing the raw message. */ public function getSentMail() { if (!empty($this->_mailer)) { return $this->_mailer->getRaw(); } $stream = new Horde_Stream_Temp(array('max_memory' => 262144)); $stream->add($this->_headers->toString(array('charset' => 'UTF-8')) . $this->_raw->getMessage(), true); return $stream; }