Changeset 5620 for trunk/expressoMail1_2/inc
- Timestamp:
- 03/05/12 03:05:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expressoMail1_2/inc/class.imap_functions.inc.php
r5605 r5620 2717 2717 //Compatibilização com Outlook, ao encaminhar a mensagem 2718 2718 $body = mb_ereg_replace('<!--\[', '<!-- [', $params['body']); 2719 $body = str_replace("%nbsp;"," ",$body); 2720 $body = preg_replace("/\n/"," ",$body); 2721 $body = preg_replace("/\r/","" ,$body); 2722 $body = html_entity_decode ( $body, ENT_QUOTES , 'ISO-8859-1' ); 2719 2723 } 2720 2724 … … 2893 2897 else 2894 2898 $mailService->addStringAttachment(base64_decode($att['source']), $att['name'], $att['type'], 'base64', isset($att['disposition']) ? $att['disposition'] :'attachment' ); 2895 2899 2900 $message_size_total += $att['size']; 2896 2901 unset($att); 2897 2902 } … … 2899 2904 { 2900 2905 $value = json_decode($value, true); 2901 $sub = $value['name'] ? $value['name'].'.eml' :'no title.eml'; 2902 $mbox_stream = $this->open_mbox($value['folder']); 2903 $rawmsg = $this->getRawHeader($value['uid']) . "\r\n\r\n" . $this->getRawBody($value['uid']); 2904 $mailService->addStringAttachment($rawmsg, $sub, 'message/rfc822', '7bit', 'attachment' ); 2905 $message_size_total += mb_strlen($rawmsg); //Adiciona o tamanho do anexo a variavel que controlao tamanho da msg. 2906 unset($rawmsg); 2906 2907 switch ($value['type']) { 2908 case 'imapPart': 2909 $att = $this->getForwardingAttachment($value['folder'],$value['uid'], $value['part']); 2910 if(strstr($body,'<img src="./inc/get_archive.php?msgFolder='.$value['folder'].'&msgNumber='.$value['uid'].'&indexPart='.$value['part'].'" />') !== false)//Embeded IMG 2911 { 2912 $body = str_ireplace('<img src="./inc/get_archive.php?msgFolder='.$value['folder'].'&msgNumber='.$value['uid'].'&indexPart='.$value['part'].'" />' , '<img src="'.$att['name'].'" />', $body); 2913 $mailService->addStringImage($att['source'], $att['type'], $att['name']); 2914 } 2915 else 2916 $mailService->addStringAttachment($att['source'], $att['name'], $att['type'], 'base64', isset($att['disposition']) ? $att['disposition'] :'attachment' ); 2917 2918 $message_size_total += $att['size']; //Adiciona o tamanho do anexo a variavel que controlao tamanho da msg. 2919 unset($att); 2920 break; 2921 case 'imapMSG': 2922 $sub = $value['name'] ? $value['name'].'.eml' :'no title.eml'; 2923 $mbox_stream = $this->open_mbox($value['folder']); 2924 $rawmsg = $this->getRawHeader($value['uid']) . "\r\n\r\n" . $this->getRawBody($value['uid']); 2925 $mailService->addStringAttachment($rawmsg, $sub, 'message/rfc822', '7bit', 'attachment' ); 2926 $message_size_total += mb_strlen($rawmsg); //Adiciona o tamanho do anexo a variavel que controlao tamanho da msg. 2927 unset($rawmsg); 2928 break; 2929 2930 default: 2931 break; 2932 } 2907 2933 } 2908 2909 2934 } 2910 2935 2911 2936 $message_size_total += strlen($params['body']); /* Tamanho do corpo da mensagem. */ 2912 2937 … … 3086 3111 return $bolean; 3087 3112 } 3088 3089 function get_forwarding_attachment($msg_folder, $msg_number, $msg_part, $encoding)3090 3113 3114 function getForwardingAttachment($folder, $uid, $part, $rfc_822bodies = true , $info = true ) 3115 { 3091 3116 include_once dirname(__FILE__).'/class.attachment.inc.php'; 3092 3117 $attachment = new attachment(); 3093 $attachment->decodeConf['rfc_822bodies'] = true; //Forçar a não decodificação de mensagens em anexo. 3094 $attachment->setStructureFromMail($msg_folder, $msg_number); 3095 return $attachment->getAttachment($msg_part); 3096 } 3097 3098 function get_forwarding_attachment2($msg_folder, $msg_number, $msg_part, $encoding) 3099 { 3100 include_once dirname(__FILE__).'/class.attachment.inc.php'; 3101 $attachment = new attachment(); 3102 $attachment->setStructureFromMail($msg_folder, $msg_number); 3103 $return = $attachment->getAttachmentInfo($msg_part); 3104 $return['binary'] = $attachment->getAttachment($msg_part); 3105 return $return; 3106 } 3107 3118 $attachment->decodeConf['rfc_822bodies'] = $rfc_822bodies; //Forçar a não decodificação de mensagens em anexo. 3119 $attachment->setStructureFromMail($folder, $uid); 3120 3121 if($info === true) 3122 { 3123 $return = $attachment->getAttachmentInfo($part); 3124 $return['source'] = $attachment->getAttachment($part); 3125 return $return; 3126 } 3127 return $attachment->getAttachment($part); 3128 } 3129 3108 3130 function del_last_caracter($string) 3109 3131 {
Note: See TracChangeset
for help on using the changeset viewer.