Ignore:
Timestamp:
02/22/13 13:47:56 (11 years ago)
Author:
marcosw
Message:

Ticket #3331 - Correções para inconsistencia de anexar mensagem por aba e por janela

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/expressoMail1_2/inc/class.imap_functions.inc.php

    r7907 r7908  
    21762176                $folder = $params['folder']; 
    21772177                $folder =  mb_convert_encoding($folder, "UTF7-IMAP","ISO-8859-1"); 
    2178  
    21792178                $msgs_number = explode(",",$params['msgs_number']); 
    21802179 
     
    21932192                //$mbox_stream = $this->open_mbox($folder); 
    21942193                $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          
    21972194 
    21982195        foreach ($msgs_number as $msg_number) 
     
    27722769            $encrypt = $params['input_return_cripto']; 
    27732770            $signed = $params['input_return_digital']; 
    2774  
    2775  
    2776             //$params['attachments'] = $params['attachments']['imap']; 
    27772771 
    27782772                        $params['attachments'] = mb_convert_encoding($params['attachments'], "UTF7-IMAP","UTF-8, ISO-8859-1, UTF7-IMAP"); 
     
    29762970 
    29772971            $header = $this->get_header($msg_numb); 
    2978  
    29792972            $header_ = imap_fetchheader($this->mbox, $msg_numb, FT_UID); 
    29802973            $pattern = '/^[ \t]*Disposition-Notification-To:.*/mi'; 
     
    29982991            $isHTML = ( isset($params['type']) && $params['type'] == 'html' )?  true : false; 
    29992992 
    3000  
    3001     //  TODO - tratar mensagem criptografada e remover o AND false abaixo 
     2993                //      TODO - tratar mensagem criptografada e remover o AND false abaixo 
    30022994            if (($encrypt && $signed && $params['smime']) || ($encrypt && !$signed) AND false) { // a msg deve ser enviada cifrada... 
    30032995                $email = $this->add_recipients_cert($toaddress . ',' . $ccaddress . ',' . $ccoaddress); 
     
    30793071            foreach ($attachment as &$value)  
    30803072            { 
    3081                 /*Volta aqui*/ 
    30823073                if((int)$value > 0) //BD attachment 
    30833074                { 
    3084                     ob_start(); 
    30853075                     $att = Controller::read(array('id'=> $value , 'concept' => 'mailAttachment')); 
    30863076 
     
    30983088                else //message attachment 
    30993089                { 
    3100  
    31013090                    $value = json_decode($value, true); 
    3102  
    31033091                    if($value["folder"] == "archiver"){ 
    31043092                        $value['folder'] = "INBOX/Trash"; 
     
    31223110                            case 'imapMSG': 
    31233111                                $mbox_stream = $this->open_mbox(mb_convert_encoding($value['folder'] , 'ISO-8859-1' , 'UTF7-IMAP')); 
    3124  
    31253112                                $rawmsg = $this->getRawHeader($value['uid']) . "\r\n\r\n" . $this->getRawBody($value['uid']); 
    31263113                                 
    31273114                                $mailService->addStringAttachment($rawmsg, mb_convert_encoding(base64_decode($value['name']), 'ISO-8859-1' , 'UTF-8,ISO-8859-1'), 'message/rfc822', '7bit', 'attachment' ); 
    31283115                                /*envia o anexo para o email*/ 
    3129  
    31303116                                $message_size_total += mb_strlen($rawmsg); //Adiciona o tamanho do anexo a variavel que controlao tamanho da msg. 
    31313117                                unset($rawmsg); 
     
    32103196            { 
    32113197                $this->rfc2397ToEmbeddedAttachment($mailService , $body); 
    3212                  
    3213  
    32143198 
    32153199                $defaultStyle = ''; 
     
    48994883        $error = array(); 
    49004884 
    4901  
    4902  
    49034885        foreach($sources as $index=>$src) 
    49044886        { 
    49054887            if($src!="") 
    49064888            { 
    4907                      
    4908                  
    4909  
    49104889                //If it is a MailArchiver incomming data 
    49114890                if($params['madata']) 
     
    49194898                                $insert = $this->insert_email($source,$dest_folder,$timestamps[$index],$flags[$index]); 
    49204899 
    4921                 //volta aqui 
    49224900                $return['idsMsg'] = $insert['msg_no']; 
    4923  
    49244901                if($insert['error']) 
    49254902                { 
     
    49284905                else  
    49294906                { 
    4930                     // volta aqui 
    49314907                    $archived[] = $ids[$index]; 
    49324908                } 
Note: See TracChangeset for help on using the changeset viewer.