添加发送邮件站点

feature/pay
cyc 6 years ago
parent 8684901837
commit 896cf8dc97

@ -312,7 +312,7 @@ class BIZ_train_model extends CI_Model {
AND
ts_status != '2'
AND
bcli.COLI_WebCode = 'cht'
bcli.COLI_WebCode in ('cht','WebMob-biz','WeChat-biz')
";
$query = $this->INFO->query($sql);
return $query->result();

@ -192,6 +192,54 @@ class Index extends CI_Controller {
return;
}
//ajax发送邮件
public function ajax_sendmail(){
header('Access-Control-Allow-Origin:*');
header('Access-Control-Allow-Methods:POST, GET');
header('Access-Control-Max-Age:0');
header('Access-Control-Allow-Headers:x-requested-with, Content-Type');
header('Access-Control-Allow-Credentials:true');
$data = array();
$data['position'] = $this->input->get_post('position');
$data['phone'] = $this->input->get_post('phone');
$data['email'] = $this->input->get_post('email');
$data['name'] = $this->input->get_post('name');
$data['sex'] = $this->input->get_post('sex');
$data['school'] = $this->input->get_post('school');
$data['education'] = $this->input->get_post('education');
$data['currentcompany'] = $this->input->get_post('currentcompany');
$data['from_time'] = $this->input->get_post('from_time');
$data['to_time'] = $this->input->get_post('to_time');
$mailnody = '';
$mailnody .= '应聘职位:'.$data['position'].'<br>';
$mailnody .= '手机号码:'.$data['phone'].'<br>';
$mailnody .= '电子邮箱:'.$data['email'].'<br>';
$mailnody .= '姓名:'.$data['name'].'<br>';
if($data['sex'] == 0){
$data['sex'] = '女';
}else{
$data['sex'] = '男';
}
$mailnody .= '性别:'.$data['sex'].'<br>';
$mailnody .= '毕业院校:'.$data['school'].'<br>';
$mailnody .= '最高学历:'.$data['education'].'<br>';
$mailnody .= '当前公司:'.$data['currentcompany'].'<br>';
$mailnody .= '任职时间开始:'.$data['from_time'].'<br>';
$mailnody .= '任职时间结束:'.$data['to_time'].'<br>';
$tolist_array = array();
$tolist_array['0'] = new stdClass();
$tolist_array['0']->ddu_Email = 'cyc@hainatravel.com';
if($this->do_sendmail('cyc',$tolist_array,'','应聘简历',$mailnody)){
echo '{"status":1}';
}else{
echo '{"status":0}';
}
}
//执行邮件发送功能
public function do_sendmail($fromuser, $tolist_array, $cclist_array, $subject, $mailbody) {
$this->load->library('Phpmailer_lib');

Loading…
Cancel
Save