Hello.
There was such a dilemma: In the module there is public $email = 'test@test.test'
In the config / main I connect this module, but I don’t change this value in the configs, then, in the view I need, the following code occurs:
$email = "myEmail@email.email"; $myModule = \Yii::$app->getModule('myModName'); $myModule->email = $email; On the module side there is a controller with this piece of code:
Yii::$app->mailer........->setTo($this->module->email)->...... The essence of the problem: I was at the entrance to test@test.test email, and it remains so on the controller, although I seem to change the value of the property above.
What am I wrong in that the module controller does not see the new value in the end?