/** * @inheritdoc */ public function compose($view = null, array $params = array()) { if (isset(Yii::$app->params['local']['emailFrom'])) { return parent::compose($view, $params)->setFrom(Yii::$app->params['local']['emailFrom']); } return parent::compose(); }
/** * @param null $view * @param array $params * @return Message */ public function compose($view = null, array $params = []) { $message = parent::compose($view, $params); if ($message instanceof Message) { $message->view = $view; } return $message; }
/** @inheritdoc */ public function compose($view = null, array $params = []) { if ($this->_serverName) { $_SERVER['SERVER_NAME'] = $this->_serverName; } $message = parent::compose($view, $params); /** @var SwiftMessage $message */ if ($this->_returnPath) { $message->setReturnPath($this->_returnPath); } return $message; }