Example #1
0
 /**
  *
  * @return IfwPsn_Vendor_Zend_Mail_Transport_Abstract|null
  */
 public function getMail()
 {
     if (null === $this->_transport) {
         $options = $this->getOptions();
         foreach ($options as $key => $option) {
             $options[strtolower($key)] = $option;
         }
         $this->setOptions($options);
         if (isset($options['transport']) && !is_numeric($options['transport'])) {
             $this->_transport = $this->_setupTransport($options['transport']);
             if (!isset($options['transport']['register']) || $options['transport']['register'] == '1' || isset($options['transport']['register']) && !is_numeric($options['transport']['register']) && (bool) $options['transport']['register'] == true) {
                 IfwPsn_Vendor_Zend_Mail::setDefaultTransport($this->_transport);
             }
         }
         $this->_setDefaults('from');
         $this->_setDefaults('replyTo');
     }
     return $this->_transport;
 }