config smtp
This commit is contained in:
parent
add34538f1
commit
dddef5cc1c
@ -1,4 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
return [
|
return [
|
||||||
'adminEmail' => 'admin@example.com',
|
'adminEmail' => 'supp0rt.friday@yandex.ru',
|
||||||
];
|
];
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
return [
|
return [
|
||||||
'adminEmail' => 'admin@example.com',
|
'adminEmail' => 'supp0rt.friday@yandex.ru',
|
||||||
'supportEmail' => 'support@example.com',
|
'supportEmail' => 'supp0rt.friday@yandex.ru',
|
||||||
|
'senderEmail' => 'supp0rt.friday@yandex.ru',
|
||||||
|
'senderName' => 'Friday.support mailer',
|
||||||
'user.passwordResetTokenExpire' => 3600,
|
'user.passwordResetTokenExpire' => 3600,
|
||||||
|
'user.passwordMinLength' => 8,
|
||||||
];
|
];
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
return [
|
return [
|
||||||
'adminEmail' => 'admin@example.com',
|
'adminEmail' => 'supp0rt.friday@yandex.ru',
|
||||||
];
|
];
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
return [
|
return [
|
||||||
'adminEmail' => 'admin@example.com',
|
'adminEmail' => 'supp0rt.friday@yandex.ru',
|
||||||
];
|
];
|
||||||
|
@ -51,10 +51,18 @@ class ContactForm extends Model
|
|||||||
public function sendEmail($email)
|
public function sendEmail($email)
|
||||||
{
|
{
|
||||||
return Yii::$app->mailer->compose()
|
return Yii::$app->mailer->compose()
|
||||||
->setTo($email)
|
->setTo($this->email)
|
||||||
->setFrom([$this->email => $this->name])
|
->setFrom([Yii::$app->params['senderEmail'] => Yii::$app->params['senderName']])
|
||||||
|
// ->setReplyTo([$this->email => $this->name])
|
||||||
->setSubject($this->subject)
|
->setSubject($this->subject)
|
||||||
->setTextBody($this->body)
|
->setTextBody($this->body)
|
||||||
->send();
|
->send();
|
||||||
|
|
||||||
|
// return Yii::$app->mailer->compose()
|
||||||
|
// ->setTo($email)
|
||||||
|
// ->setFrom([$this->email => $this->name])
|
||||||
|
// ->setSubject($this->subject)
|
||||||
|
// ->setTextBody($this->body)
|
||||||
|
// ->send();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user