修改post方式

mobile-first
cyc 5 years ago
parent 0b5fd5bddb
commit d7b2b944a5

@ -155,8 +155,13 @@ class Index extends CI_Controller {
}
//提交到其他服务器发送
$url = 'https://cht.mycht.cn/webht.php/apps/dingmail/index/do_sendmail/'.$fromuser.'/'.$tomail.'/'.$subject.'/'.$body;
$flag = $this->get_http($url);
$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;
$flag = $this->get_http($url,$post_data);
if (!$flag) {
$result = 0; //"邮件发送有误: " . $mail->ErrorInfo;
@ -231,8 +236,12 @@ class Index extends CI_Controller {
}
//执行邮件发送功能
public function do_sendmail($fromuser, $tomail, $subject, $mailbody) {
public function do_sendmail() {
require 'email.class.php';
$fromuser = $this->input->get_post('fromuser');
$tomail = $this->input->get_post('tomail');
$subject = $this->input->get_post('subject');
$mailbody = $this->input->get_post('mailbody');
$mailto = $tomail;
$mailsubject = $subject;
$mailbody = $mailbody;

Loading…
Cancel
Save