作者 邓超

x

@@ -325,17 +325,20 @@ class Body { @@ -325,17 +325,20 @@ class Body {
325 // 是文本还是附件 325 // 是文本还是附件
326 else if(strpos($data['type'],'text/') === 0 ){ 326 else if(strpos($data['type'],'text/') === 0 ){
327 327
  328 + $tempbody = trim($this->body_remove_tag($data['body'],'Content-ID:'));
  329 +
  330 + $tempbody = $this->body_remove_tag($tempbody,"Content-");
  331 + $tempbody = $this->body_remove_tag($tempbody,"Content-");
  332 + $tempbody = $this->body_remove_tag($tempbody,"Content-");
  333 + $tempbody = $this->body_remove_tag($tempbody,"Content-");
  334 +
328 // 这里还有可能出现附件 335 // 这里还有可能出现附件
329 - if($filename&&!empty($isfileattachment)){ 336 + if($filename&&!empty($isfileattachment)&&MailFun::isBase64($tempbody)){
330 $data = $this->parseFile($data,$filename); 337 $data = $this->parseFile($data,$filename);
331 }else{ 338 }else{
332 // tag 339 // tag
333 - $data['body'] = trim($this->body_remove_tag($data['body'],'Content-ID:'));  
334 340
335 - $data['body'] = $this->body_remove_tag($data['body'],"Content-");  
336 - $data['body'] = $this->body_remove_tag($data['body'],"Content-");  
337 - $data['body'] = $this->body_remove_tag($data['body'],"Content-");  
338 - $data['body'] = $this->body_remove_tag($data['body'],"Content-"); 341 + $data['body'] = $tempbody;
339 342
340 // body解密 343 // body解密
341 switch($data['encode']??''){ 344 switch($data['encode']??''){