diff --git a/webht/third_party/dingmail/controllers/index.php b/webht/third_party/dingmail/controllers/index.php
index 9a14123a..89d9798d 100644
--- a/webht/third_party/dingmail/controllers/index.php
+++ b/webht/third_party/dingmail/controllers/index.php
@@ -126,6 +126,7 @@ class Index extends CI_Controller {
$tostring = '';
$tostring = substr($data['mail_touser'],0,-1);
+ $tostring = "'".$tostring."'";
if(!empty($tostring)){
$tomail = $this->ding_value_model->all_email($tostring);
@@ -133,68 +134,52 @@ class Index extends CI_Controller {
$tomail = null;
}
- //抄送
- $ccstring = '';
- $cclist_array = array();
- $ccmail_array = explode(';', $this->input->post('cs_emaillist'));
-
- foreach ($ccmail_array as $c) {
- if($c != null){
- $ccstring .= "'".$c."'".',';
- }
- }
- $ccstring = substr($ccstring,0,-1);
- if(!empty($ccstring)){
- $cclist_array = $this->ding_value_model->all_email($ccstring);
- }else{
- $cclist_array = null;
- }
- $mailheader = '
FROM:'.$user_info->ddu_Name.'
';
- $mailbody = '';
-
- $fromuser = $user_info->ddu_Name;
- $subject = $this->input->post('mail_subject');
-
- //是否为value邮件,如果不是value邮件,不在邮件下放置点赞按钮
- if($this->input->post('whum_value_user')){
- $body = $mailheader.$this->input->post('emailcontent').$mailbody;
- }else{
- $body = $mailheader.$this->input->post('emailcontent');
- }
-
- //提交到其他服务器发送
- $url = 'https://cht.mycht.cn/webht.php/apps/dingmail/index/do_sendmail'.$fromuser.'/'.$tomail.'/'.$subject.'/'.$body;
- $flag = $this->get_http($url);
-
- if (!$flag) {
- $result = 0; //"邮件发送有误: " . $mail->ErrorInfo;
- } else {
- //是value邮件的话,默认发送人点赞
- if ($this->input->post('whum_value_user')) {
- $obj = explode(';', $this->input->post('whum_value_user'));
- foreach(array_filter($obj) as $value){
- $data['comment_name'] = $value;
- $data['comment_unionid'] = $this->ding_value_model->get_dingding_unionid($data['comment_name'])->ddu_Unionid;
- $data['type'] = 'like';
- $data['mail_identify'] = $data['mail_identify'];
- $data['user'] = $user_info->ddu_Name;
- $data['user_unionid'] = $user_info->ddu_Unionid;
- $data['content'] = $this->ding_value_model->get_mail($data['mail_identify'])->ddm_Content;
- $data['createtime'] = time();
- $whc_id = $this->ding_value_model->add_value($data);
- }
+ $mailheader = 'FROM:'.$user_info->ddu_Name.'
';
+ $mailbody = '';
+
+ $fromuser = $user_info->ddu_Name;
+ $subject = $this->input->post('mail_subject');
+
+ //是否为value邮件,如果不是value邮件,不在邮件下放置点赞按钮
+ if($this->input->post('whum_value_user')){
+ $body = $mailheader.$this->input->post('emailcontent').$mailbody;
+ }else{
+ $body = $mailheader.$this->input->post('emailcontent');
+ }
+
+ //提交到其他服务器发送
+ $url = 'https://cht.mycht.cn/webht.php/apps/dingmail/index/do_sendmail'.$fromuser.'/'.$tomail.'/'.$subject.'/'.$body;
+ $flag = $this->get_http($url);
+
+ if (!$flag) {
+ $result = 0; //"邮件发送有误: " . $mail->ErrorInfo;
+ } else {
+ //是value邮件的话,默认发送人点赞
+ if ($this->input->post('whum_value_user')) {
+ $obj = explode(';', $this->input->post('whum_value_user'));
+ foreach(array_filter($obj) as $value){
+ $data['comment_name'] = $value;
+ $data['comment_unionid'] = $this->ding_value_model->get_dingding_unionid($data['comment_name'])->ddu_Unionid;
+ $data['type'] = 'like';
+ $data['mail_identify'] = $data['mail_identify'];
+ $data['user'] = $user_info->ddu_Name;
+ $data['user_unionid'] = $user_info->ddu_Unionid;
+ $data['content'] = $this->ding_value_model->get_mail($data['mail_identify'])->ddm_Content;
+ $data['createtime'] = time();
+ $whc_id = $this->ding_value_model->add_value($data);
}
- $result = 1;
}
- echo $result;
- return;
+ $result = 1;
+ }
+ echo $result;
+ return;
}
//ajax发送邮件