Changeset 6536 for trunk


Ignore:
Timestamp:
06/18/12 16:11:03 (12 years ago)
Author:
cristiano
Message:

Ticket #2866 - Inconsistência na funcionalidade de anexar mensagens

Location:
trunk
Files:
2 edited

Legend:

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

    r6528 r6536  
    29232923                     { 
    29242924                         $body = str_replace('"../prototype/getArchive.php?mailAttachment='.$att['id'].'"', $att['name'], $body); 
    2925                          $mailService->addStringImage(base64_decode($att['source']), $att['type'], $att['name']); 
     2925                         $mailService->addStringImage(base64_decode($att['source']), $att['type'], mb_convert_encoding($att['name'], 'ISO-8859-1' , 'UTF-8,ISO-8859-1')); 
    29262926                     } 
    29272927                     else 
    2928                          $mailService->addStringAttachment(base64_decode($att['source']), $att['name'], $att['type'], 'base64', isset($att['disposition']) ? $att['disposition'] :'attachment' ); 
     2928                         $mailService->addStringAttachment(base64_decode($att['source']), mb_convert_encoding($att['name'], 'ISO-8859-1' , 'UTF-8,ISO-8859-1'), $att['type'], 'base64', isset($att['disposition']) ? $att['disposition'] :'attachment' ); 
    29292929                      
    29302930                     $message_size_total += $att['size']; 
     
    29412941                                {     
    29422942                                    $body = str_ireplace('<img src="./inc/get_archive.php?msgFolder='.$value['folder'].'&msgNumber='.$value['uid'].'&indexPart='.$value['part'].'" />' , '<img src="'.$att['name'].'" />', $body); 
    2943                                     $mailService->addStringImage($att['source'], $att['type'], $att['name']); 
     2943                                    $mailService->addStringImage($att['source'], $att['type'],mb_convert_encoding($att['name'], 'ISO_8859-1' , 'UTF-8,ISO_8859-1') ); 
    29442944                                } 
    29452945                                else 
    2946                                     $mailService->addStringAttachment($att['source'], $att['name'], $att['type'], 'base64', isset($att['disposition']) ? $att['disposition'] :'attachment' ); 
     2946                                    $mailService->addStringAttachment($att['source'], mb_convert_encoding($att['name'], 'ISO-8859-1' , 'UTF-8,ISO-8859-1'), $att['type'], 'base64', isset($att['disposition']) ? $att['disposition'] :'attachment' ); 
    29472947                                  
    29482948                                $message_size_total += $att['size']; //Adiciona o tamanho do anexo a variavel que controlao tamanho da msg. 
     
    29522952                                $mbox_stream = $this->open_mbox($value['folder']); 
    29532953                                $rawmsg = $this->getRawHeader($value['uid']) . "\r\n\r\n" . $this->getRawBody($value['uid']); 
    2954                                 $mailService->addStringAttachment($rawmsg, base64_decode($value['name']), 'message/rfc822', '7bit', 'attachment' ); 
     2954                                 
     2955                                $mailService->addStringAttachment($rawmsg, mb_convert_encoding(base64_decode($value['name']), 'ISO-8859-1' , 'UTF-8,ISO-8859-1'), 'message/rfc822', '7bit', 'attachment' ); 
    29552956                                $message_size_total += mb_strlen($rawmsg); //Adiciona o tamanho do anexo a variavel que controlao tamanho da msg. 
    29562957                                unset($rawmsg); 
  • trunk/prototype/services/ImapServiceAdapter.php

    r6528 r6536  
    630630                                                { 
    631631                                                        $body = str_replace('"../prototype/getArchive.php?mailAttachment='.$att['id'].'"', $att['name'], $body); 
    632                                                         $mailService->addStringImage(base64_decode($att['source']), $att['type'], $att['name']); 
     632                                                        $mailService->addStringImage(base64_decode($att['source']), $att['type'], mb_convert_encoding($att['name'], 'ISO-8859-1' , 'UTF-8,ISO-8859-1')); 
    633633                                                } 
    634634                                                else 
    635                                                         $mailService->addStringAttachment(base64_decode($att['source']), $att['name'], $att['type'], 'base64', isset($att['disposition']) ? $att['disposition'] :'attachment' ); 
     635                                                        $mailService->addStringAttachment(base64_decode($att['source']), mb_convert_encoding($att['name'], 'ISO-8859-1' , 'UTF-8,ISO-8859-1'), $att['type'], 'base64', isset($att['disposition']) ? $att['disposition'] :'attachment' ); 
    636636 
    637637                                                unset($att); 
     
    647647                                                                {     
    648648                                                                        $body = str_ireplace('<img src="./inc/get_archive.php?msgFolder='.$value['folder'].'&msgNumber='.$value['uid'].'&indexPart='.$value['part'].'" />' , '<img src="'.$att['name'].'" />', $body); 
    649                                                                         $mailService->addStringImage($att['source'], $att['type'], $att['name']); 
     649                                                                        $mailService->addStringImage($att['source'], $att['type'], mb_convert_encoding($att['name'], 'ISO-8859-1' , 'UTF-8,ISO-8859-1')); 
    650650                                                                } 
    651651                                                                else 
    652                                                                         $mailService->addStringAttachment($att['source'], $att['name'], $att['type'], 'base64', isset($att['disposition']) ? $att['disposition'] :'attachment' ); 
     652                                                                        $mailService->addStringAttachment($att['source'], mb_convert_encoding($att['name'], 'ISO-8859-1' , 'UTF-8,ISO-8859-1'), $att['type'], 'base64', isset($att['disposition']) ? $att['disposition'] :'attachment' ); 
    653653                                                                unset($att); 
    654654                                                                break; 
     
    656656                                                                $mbox_stream = $this->open_mbox($value['folder']); 
    657657                                                                $rawmsg = $this->getRawHeader($value['uid']) . "\r\n\r\n" . $this->getRawBody($value['uid']); 
    658                                                                 $mailService->addStringAttachment($rawmsg, base64_decode($value['name']), 'message/rfc822', '7bit', 'attachment' ); 
     658                                                                $mailService->addStringAttachment($rawmsg, mb_convert_encoding(base64_decode($value['name']), 'ISO-8859-1' , 'UTF-8,ISO-8859-1'), 'message/rfc822', '7bit', 'attachment' ); 
    659659                                                                unset($rawmsg); 
    660660                                                                break; 
Note: See TracChangeset for help on using the changeset viewer.