public function init() { $result = parent::init(); //Set dependecies. $this->getBootstrap()->bootstrap('view'); App_Mail::setDefaultOptions($this->getOptions()); return $result; }
public function init() { return parent::init(); // $options = $this->getOptions(); // $transport = new Zend_Mail_Transport_Smtp($options['transport']['host'], $options['transport']); // // Zend_Mail::setDefaultTransport($transport); // return $transport; }
/** * @group ZF-9136 */ public function testCustomMailTransportWithWrontCasesAsShouldBe() { $options = array('transport' => array('type' => 'Zend_Application_Resource_mailTestCAsE')); $resource = new Zend_Application_Resource_Mail(array()); $resource->setBootstrap($this->bootstrap); $resource->setOptions($options); $this->assertTrue($resource->init() instanceof Zend_Application_Resource_mailTestCAsE); }
/** * @group ZF-11022 */ public function testOptionRegisterIsUnset() { $options = array('transport' => array('register' => 1, 'type' => 'Zend_Mail_Transport_Sendmail')); $resource = new Zend_Application_Resource_Mail(array()); $resource->setBootstrap($this->bootstrap); $resource->setOptions($options); $this->assertEmpty($resource->getMail()->parameters); }