I am new for yii2, I am developing web application that sends alerts to user based on their desired categories:
i want to send list of titles with a link to users
**tender is a table with id ,title , detail.bidstatus
i am trying to send the list of tenders to a user or users
//i tried the following codes but not showing the list of tenders
public function sendEmail($email)
{
$tenderstatus='Open';
$bids=Tenderlist::find()
->andFilterWhere(['bidstatus'=>$tenderstatus,]);
return Yii::$app->mailer->compose()
->setTo($email)
->setFrom([$this->email => $this->name])
->setSubject($this->subject)
//->setTextBody($this->body)
->setHtmlBody($bids)
->send();
}