public function notifyResponsible($event)
    {
        // first email address should be admin@domain.com because from other email address mail can't be sent
        $from = [Yii::$app->params['email']['from'] => 'not-reply'];
        // add real sender
        $from[$this->author->email] = $this->author->name;
        // receiver
        $receiver = Yii::$app->params['email']['receiver']['comment'];
        $to = Yii::$app->params['email']['to'][$receiver];
        return Yii::$app->mailer->compose()
            ->setTo($to)
            ->setFrom($from)
            ->setSubject(Module::t('core', 'New comment for') . ' - ' . Lookup::item('CommentFor', $this->model))
            ->setTextBody($this->content)
            ->send();
    }
public function notifyResponsible($event)
    {
        // first email address should be admin@domain.com because from other email address mail can't be sent
        $from = [Yii::$app->params['email']['from'] => 'not-reply'];
        // add real sender
        $from[$this->author->email] = $this->author->name;
        // receiver
        $receiver = Yii::$app->params['email']['receiver']['comment'];
        $to = Yii::$app->params['email']['to'][$receiver];
        return Yii::$app->mailer->compose()
            ->setTo($to)
            ->setFrom($from)
            ->setSubject(Module::t('core', 'New comment for') . ' - ' . Lookup::item('CommentFor', $this->model))
            ->setTextBody($this->content)
            ->send();
    }
public function notifyResponsible ( $ event ) { // first email address should be admin@domain.com because from other email address mail can't be sent $ from = [ Yii :: $ app -> params [ 'email' ] [ 'from' ] => 'not-reply' ] ; // add real sender $ from [ $ this -> author -> email ] = $ this -> author -> name ; // receiver $ receiver = Yii :: $ app -> params [ 'email' ] [ 'receiver' ] [ 'comment' ] ; $ to = Yii :: $ app -> params [ 'email' ] [ 'to' ] [ $ receiver ] ; return Yii :: $ app -> mailer -> compose ( ) -> setTo ( $ to ) -> setFrom ( $ from ) -> setSubject ( Module :: t ( 'core' , 'New comment for' ) . ' - ' . Lookup :: item ( 'CommentFor' , $ this -> model ) ) -> setTextBody ( $ this -> content ) -> send ( ) ; }
Send email for responsible person.
Send email for responsible person .