config smtp
This commit is contained in:
@ -51,10 +51,18 @@ class ContactForm extends Model
|
||||
public function sendEmail($email)
|
||||
{
|
||||
return Yii::$app->mailer->compose()
|
||||
->setTo($email)
|
||||
->setFrom([$this->email => $this->name])
|
||||
->setTo($this->email)
|
||||
->setFrom([Yii::$app->params['senderEmail'] => Yii::$app->params['senderName']])
|
||||
// ->setReplyTo([$this->email => $this->name])
|
||||
->setSubject($this->subject)
|
||||
->setTextBody($this->body)
|
||||
->send();
|
||||
|
||||
// return Yii::$app->mailer->compose()
|
||||
// ->setTo($email)
|
||||
// ->setFrom([$this->email => $this->name])
|
||||
// ->setSubject($this->subject)
|
||||
// ->setTextBody($this->body)
|
||||
// ->send();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user