contactus

how to get email field of contact us form in the email which admin got (yii2)

≯℡__Kan透↙ 提交于 2019-12-24 07:55:00
问题 I am using yii2 advanced contact us form. but unable to get email of user which is filled in email field of contact form.. public function sendEmail($email) { return Yii::$app->mailer->compose() ->setTo($email) ->setFrom([$this->email => $this->name]) //echo "emailll<pre>";print_r($this->email);exit; //here I am getting the correct email which is filled in contact form //but when I received mail. nowhere I got That email id... // In from: username@exmple.com which i set as username // In To :

how to get senders email Id in received mail from contact us form in yii2

非 Y 不嫁゛ 提交于 2019-12-24 07:48:15
问题 I am using yii2 default contact us page to get mail from user.. It is working fine but I am getting mail from email which I mention in code, to adminEmail which is also my email id. here is code=> public function sendEmail($email) { return Yii::$app->mailer->compose() ->setTo($email) ->setFrom([$this->email => $this->name])//want the data from email field..how to achieve that?? ->setSubject($this->subject) ->setTextBody($this->body) ->send(); } if I try like this ->setFrom([$this->email =>