/ */ class Workflow_Test_MailTransport extends Zend_Mail_Transport_Abstract { protected $_sentMailsRegister = array(); /** * Add email properties to the sent emails register. * Does not send any real email. */ protected function _sendMail() { $this->_sentMailsRegister[] = array( 'to' => $this->recipients, 'body' => $this->body, 'subject' => $this->_mail->getSubject(), 'headers' => $this->_getHeaders(null), ); } /** * Get list of emails registered by _sendMail() method since last reset. * * @return array list of emails registered by _sendMail() method. */ public function getSentMails() { return $this->_sentMailsRegister; } /** * Reset sent emails register. */ public function reset() { $this->_sentMailsRegister = array(); } }