У меня есть одно требование из моей заявки ... когда когда-либо пользователь вставляет детали в требование. И затем отправляйте письмо. То письмо отправляется конкретному поставщику с одной ссылкой ..when поставщик нажмите на ссылку я перенаправлять страницу на странице входа ..Получить последний insert_id в URL-адресе в codeigniter
Так что я хочу сделать, это я хочу, чтобы отправить по электронной почте ссылку с последним добавленным идентификатором ..
Вот мой контроллер:
public function requirement()
{
$data["msg"]="";
$this->load->model('RequirementModel');
$data['user']=$this->RequirementModel->getusers();
$data['rolename']=$this->RequirementModel->getrolename();
if($this->input->post())
{
$this->RequirementModel->add_requirement($this->input->post());
$all_users = $this->input->post('user_id');
foreach($all_users as $key)
{
$get_email = $this->RequirementModel->get_user_email_by_id($key);
$req_id = $this->input->post('req_id');
$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');
$config = Array(
'protocol' => 'smtp',
'smtp_host' => 'ssl://md-in-42.webhostbox.net',
'smtp_port' => 465,
'smtp_user' => '[email protected]',
'smtp_pass' => 'test3'
);
$this->load->library('email',$config);
$this->email->set_mailtype("html");
$this->email->from('[email protected]', 'bharathi');
$this->email->to($get_email);
$this->email->subject('this is our requirements pls go through it');
$link = 'Click on this link - <a href="http://localhost/job_portal/index.php/Login/signin>Click Here</a>';
$this->email->message($link);
print_r($get_email);
if($this->email->send())
{
echo "email sent";
}
else
{
echo "email failed";
}
}
}
$ this-> load-> Вид ('Требования/требования', $ данных);
}
Может кто-нибудь мне помочь .. Заранее спасибо ..
это общедоступный сервер? plz затушевывает ваши данные для входа – qwertzman