how to send a letter to mail in php, if the mail is indicated in the human table in the e_mail column, but the letter should be sent on the condition that it expires, if there is such a condition
'rowOptions'=>function($model){ $dun = "success"; if( date("Ymd", strtotime($model->data_okon. "-10 days")) <= date("Ymd") ){ $dun = 'warning'; } if( date("Ymd", strtotime($model->data_okon. "-5 days")) <= date("Ymd") ){ $dun = 'danger'; } return [ 'class' => $dun, ]; },
$tomail, text$message(or several), heading$subject(or several) and thrustmail($to,$subject,$message);in yourifcondition - Dan the Hat