core/components/Mail.php
public function render($viewFile, array $params = [])
    {
        $this->body(Yii::$app->view->render($viewFile, $params));
        
        return $this;
    }
public function render($viewFile, array $params = [])
    {
        $this->body(Yii::$app->view->render($viewFile, $params));
        
        return $this;
    }
public function render ( $ viewFile , array $ params = [ ] ) { $ this -> body ( Yii :: $ app -> view -> render ( $ viewFile , $ params ) ) ; return $ this ; }
Render a view file for the given Controller context.

Assuming the following example inside a controller:

```php
Yii::$app->mail->compose('Send E-Mail')->render('@app/views/_mail', ['foo' => 'bar'])->address('info@luya.io')->send();
```

@param string $viewFile The view file to render
@param array $params The parameters to pass to the view file.
@return \luya\components\Mail
Render a view file for the given Controller context .