Changeset 7908 for trunk/expressoMail1_2/inc/class.imap_functions.inc.php
- Timestamp:
- 02/22/13 13:47:56 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expressoMail1_2/inc/class.imap_functions.inc.php
r7907 r7908 2176 2176 $folder = $params['folder']; 2177 2177 $folder = mb_convert_encoding($folder, "UTF7-IMAP","ISO-8859-1"); 2178 2179 2178 $msgs_number = explode(",",$params['msgs_number']); 2180 2179 … … 2193 2192 //$mbox_stream = $this->open_mbox($folder); 2194 2193 $mbox_stream = @imap_open("{".$this->imap_server.":".$this->imap_port.$this->imap_options."}".$folder, $this->username, $this->password) or die(serialize(array('imap_error' => $this->parse_error(imap_last_error())))); 2195 2196 2197 2194 2198 2195 foreach ($msgs_number as $msg_number) … … 2772 2769 $encrypt = $params['input_return_cripto']; 2773 2770 $signed = $params['input_return_digital']; 2774 2775 2776 //$params['attachments'] = $params['attachments']['imap'];2777 2771 2778 2772 $params['attachments'] = mb_convert_encoding($params['attachments'], "UTF7-IMAP","UTF-8, ISO-8859-1, UTF7-IMAP"); … … 2976 2970 2977 2971 $header = $this->get_header($msg_numb); 2978 2979 2972 $header_ = imap_fetchheader($this->mbox, $msg_numb, FT_UID); 2980 2973 $pattern = '/^[ \t]*Disposition-Notification-To:.*/mi'; … … 2998 2991 $isHTML = ( isset($params['type']) && $params['type'] == 'html' )? true : false; 2999 2992 3000 3001 // TODO - tratar mensagem criptografada e remover o AND false abaixo 2993 // TODO - tratar mensagem criptografada e remover o AND false abaixo 3002 2994 if (($encrypt && $signed && $params['smime']) || ($encrypt && !$signed) AND false) { // a msg deve ser enviada cifrada... 3003 2995 $email = $this->add_recipients_cert($toaddress . ',' . $ccaddress . ',' . $ccoaddress); … … 3079 3071 foreach ($attachment as &$value) 3080 3072 { 3081 /*Volta aqui*/3082 3073 if((int)$value > 0) //BD attachment 3083 3074 { 3084 ob_start();3085 3075 $att = Controller::read(array('id'=> $value , 'concept' => 'mailAttachment')); 3086 3076 … … 3098 3088 else //message attachment 3099 3089 { 3100 3101 3090 $value = json_decode($value, true); 3102 3103 3091 if($value["folder"] == "archiver"){ 3104 3092 $value['folder'] = "INBOX/Trash"; … … 3122 3110 case 'imapMSG': 3123 3111 $mbox_stream = $this->open_mbox(mb_convert_encoding($value['folder'] , 'ISO-8859-1' , 'UTF7-IMAP')); 3124 3125 3112 $rawmsg = $this->getRawHeader($value['uid']) . "\r\n\r\n" . $this->getRawBody($value['uid']); 3126 3113 3127 3114 $mailService->addStringAttachment($rawmsg, mb_convert_encoding(base64_decode($value['name']), 'ISO-8859-1' , 'UTF-8,ISO-8859-1'), 'message/rfc822', '7bit', 'attachment' ); 3128 3115 /*envia o anexo para o email*/ 3129 3130 3116 $message_size_total += mb_strlen($rawmsg); //Adiciona o tamanho do anexo a variavel que controlao tamanho da msg. 3131 3117 unset($rawmsg); … … 3210 3196 { 3211 3197 $this->rfc2397ToEmbeddedAttachment($mailService , $body); 3212 3213 3214 3198 3215 3199 $defaultStyle = ''; … … 4899 4883 $error = array(); 4900 4884 4901 4902 4903 4885 foreach($sources as $index=>$src) 4904 4886 { 4905 4887 if($src!="") 4906 4888 { 4907 4908 4909 4910 4889 //If it is a MailArchiver incomming data 4911 4890 if($params['madata']) … … 4919 4898 $insert = $this->insert_email($source,$dest_folder,$timestamps[$index],$flags[$index]); 4920 4899 4921 //volta aqui4922 4900 $return['idsMsg'] = $insert['msg_no']; 4923 4924 4901 if($insert['error']) 4925 4902 { … … 4928 4905 else 4929 4906 { 4930 // volta aqui4931 4907 $archived[] = $ids[$index]; 4932 4908 }
Note: See TracChangeset
for help on using the changeset viewer.