I have two tables in my database one is users and another one is requirements..so I displayed user names in the requirements form with multiple select dropdown..when admin send requirements from the requirement form...I need to send that requirement to particular users..with selected by the admin from the dropdown..
this is my controller :
public function requirement() {
$this->load->model('RequirementModel');
$data['user']=$this->RequirementModel->getusers();
$this->load->view('Requirements/requirements',$data);
$insert=array(
'role_name'=>$this->input->post('role_name'),
'vacancies'=>$this->input->post('vacancies'),
'experience'=>$this->input->post('experience'),
'jd'=>$this->input->post('jd'),
'hiring_contact_name'=>$this->input->post('hiring_contact_name'),
'hiring_contact_number'=>$this->input->post('hiring_contact_number'),
'user_id'=> implode(',',$this->input->post('user_id'))
);
$this->RequirementModel->add_requirement($insert);
}
Please help me how can we send mail to the particular users.. Thank You