As the letter is the sender to specify your own text?

Now I'm trying to write.
'mailer' => [
 'class' => 'yii\swiftmailer\Mailer',
 'messageConfig' => [
 'from' => ['noreply@unverified.beget.ru' => 'test'],
],
 ],


but I all the same writes that 'noreply@unverified.beget.ru' where am I doing wrong?
June 26th 19 at 14:02
3 answers
June 26th 19 at 14:04
Good morning.
Try using compose() to do it.
Something like this:
Yii::$app->mailer->compose('@app/modules/users/mails/passwordReset', ['user' => $user])
 ->setFrom (Yii::$app->params['supportEmail'] => Yii::$app->name . 'robot'])
->setTo($this->email)
 ->setSubject('Password reset for' . Yii::$app->name)
 ->send();
June 26th 19 at 14:06
As I understand it is necessary to write this?
Yii::$app->mailer->compose('@app/modules/users/mails/passwordReset', ['user' => $user])
 ->setFrom (Yii::$app->params['supportEmail'] => 'sssssssssssssssssssss'])
->setTo($this->email)
 ->setSubject('Password reset for' . Yii::$app->name)
 ->send();


if so then something doesn't work, or I not correctly did something?
June 26th 19 at 14:08
To change the value of the supportEmail key in your text in the configuration fileradar.

Find more questions by tags Yii