diff --git a/email/components/EEmailManager.php b/email/components/EEmailManager.php index a0e011a..f78d6b4 100644 --- a/email/components/EEmailManager.php +++ b/email/components/EEmailManager.php @@ -4,6 +4,7 @@ * EEmailManager * * @property string $fromName + * @property array $transports * * @author Brett O'Donnell * @author Zain Ul abidin @@ -85,12 +86,28 @@ class EEmailManager extends CApplicationComponent * ) * */ - public $transports = array( + protected $_transports = array( 'mail' => array( 'class' => 'Swift_MailTransport', ), ); + /** + * @return array + */ + public function getTransports() + { + return $this->_transports; + } + + /** + * @param array $transports + */ + public function setTransports($transports) + { + $this->_transports = $transports; + } + /** * */ @@ -181,8 +198,7 @@ public function deliver($swiftMessage, $transport = null) if (isset($options['class'])) { $class = $options['class']; unset($options['class']); - } - else { + } else { throw new CException(Yii::t('email', 'Transport :transport does not have a class.', array(':transport' => $transport))); } @@ -190,8 +206,7 @@ public function deliver($swiftMessage, $transport = null) if (isset($options['setters'])) { $setters = $options['setters']; unset($options['setters']); - } - else { + } else { $setters = array(); }