php - YII framework Create A Contact Form To Send Mail To Email Id Of Another Model's Entry -
i have form store values model add having rows id name description , 1 email store email particular entry.
now want contact form send mail particular model values...
that send mail owner of particular add..
i able reuse contact form purpose fail fetch saved email id each add viewer can mail adds..
how achive task?? please me someone..
let me know how can this??
if example code useful me..
thank you.....
search db if there matching email address
in contact form processing controller
$model = contacts::model()->findbyattributes( 'email'=>$_post['contactform']['email_address']) if (!is_null($model)) ... send mail ... else yii::app()->user->setflash('error','that email address not registered');
Comments
Post a Comment