diff --git a/webht/third_party/dingmail/controllers/index.php b/webht/third_party/dingmail/controllers/index.php index c52a7b4f..4aec0b55 100644 --- a/webht/third_party/dingmail/controllers/index.php +++ b/webht/third_party/dingmail/controllers/index.php @@ -157,7 +157,6 @@ class Index extends CI_Controller { //提交到其他服务器发送 $url = 'https://cht.mycht.cn/webht.php/apps/dingmail/index/do_sendmail/'; $post_data = array(); - $post_data['fromuser'] = $fromuser; $post_data['tomail'] = $tomail; $post_data['subject'] = $subject; $post_data['body'] = $body; @@ -195,7 +194,7 @@ class Index extends CI_Controller { header('Access-Control-Allow-Headers:x-requested-with, Content-Type'); header('Access-Control-Allow-Credentials:true'); - $data = array(); + $data = array(); $data['position'] = $this->input->get_post('position'); $data['phone'] = $this->input->get_post('phone'); @@ -236,14 +235,18 @@ class Index extends CI_Controller { } //执行邮件发送功能 - public function do_sendmail($fromuser, $tomail, $subject, $mailbody) { + public function do_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'); + require 'email.class.php'; - $fromuser = $this->input->get_post('fromuser'); $tomail = $this->input->get_post('tomail'); - $subject = $this->input->get_post('subject'); + $mailsubject = $this->input->get_post('subject'); $mailbody = $this->input->get_post('mailbody'); - $mailsubject = $subject; - $mailbody = $mailbody; + $smtpserver = "smtp.qiye.aliyun.com"; $smtpserverport = 25; $smtpusermail = "admin@hainatravel.com";