Changeset 6540
- Timestamp:
- 06/18/12 17:42:29 (11 years ago)
- Location:
- branches/2.4
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.4/expressoMail1_2/inc/class.imap_functions.inc.php
r6520 r6540 2924 2924 { 2925 2925 $body = str_replace('"../prototype/getArchive.php?mailAttachment='.$att['id'].'"', $att['name'], $body); 2926 $mailService->addStringImage(base64_decode($att['source']), $att['type'], $att['name']);2926 $mailService->addStringImage(base64_decode($att['source']), $att['type'], mb_convert_encoding($att['name'], 'ISO-8859-1' , 'UTF-8,ISO-8859-1')); 2927 2927 } 2928 2928 else 2929 $mailService->addStringAttachment(base64_decode($att['source']), $att['name'], $att['type'], 'base64', isset($att['disposition']) ? $att['disposition'] :'attachment' );2929 $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' ); 2930 2930 2931 2931 $message_size_total += $att['size']; … … 2942 2942 { 2943 2943 $body = str_ireplace('<img src="./inc/get_archive.php?msgFolder='.$value['folder'].'&msgNumber='.$value['uid'].'&indexPart='.$value['part'].'" />' , '<img src="'.$att['name'].'" />', $body); 2944 $mailService->addStringImage($att['source'], $att['type'], $att['name']);2944 $mailService->addStringImage($att['source'], $att['type'],mb_convert_encoding($att['name'], 'ISO_8859-1' , 'UTF-8,ISO_8859-1') ); 2945 2945 } 2946 2946 else 2947 $mailService->addStringAttachment($att['source'], $att['name'], $att['type'], 'base64', isset($att['disposition']) ? $att['disposition'] :'attachment' );2947 $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' ); 2948 2948 2949 2949 $message_size_total += $att['size']; //Adiciona o tamanho do anexo a variavel que controlao tamanho da msg. … … 2953 2953 $mbox_stream = $this->open_mbox($value['folder']); 2954 2954 $rawmsg = $this->getRawHeader($value['uid']) . "\r\n\r\n" . $this->getRawBody($value['uid']); 2955 $mailService->addStringAttachment($rawmsg, base64_decode($value['name']), 'message/rfc822', '7bit', 'attachment' ); 2955 2956 $mailService->addStringAttachment($rawmsg, mb_convert_encoding(base64_decode($value['name']), 'ISO-8859-1' , 'UTF-8,ISO-8859-1'), 'message/rfc822', '7bit', 'attachment' ); 2956 2957 $message_size_total += mb_strlen($rawmsg); //Adiciona o tamanho do anexo a variavel que controlao tamanho da msg. 2957 2958 unset($rawmsg); -
branches/2.4/prototype/services/ImapServiceAdapter.php
r6389 r6540 626 626 { 627 627 $body = str_replace('"../prototype/getArchive.php?mailAttachment='.$att['id'].'"', $att['name'], $body); 628 $mailService->addStringImage(base64_decode($att['source']), $att['type'], $att['name']);628 $mailService->addStringImage(base64_decode($att['source']), $att['type'], mb_convert_encoding($att['name'], 'ISO-8859-1' , 'UTF-8,ISO-8859-1')); 629 629 } 630 630 else 631 $mailService->addStringAttachment(base64_decode($att['source']), $att['name'], $att['type'], 'base64', isset($att['disposition']) ? $att['disposition'] :'attachment' );632 631 $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' ); 632 633 633 unset($att); 634 634 } … … 643 643 { 644 644 $body = str_ireplace('<img src="./inc/get_archive.php?msgFolder='.$value['folder'].'&msgNumber='.$value['uid'].'&indexPart='.$value['part'].'" />' , '<img src="'.$att['name'].'" />', $body); 645 $mailService->addStringImage($att['source'], $att['type'], $att['name']);645 $mailService->addStringImage($att['source'], $att['type'], mb_convert_encoding($att['name'], 'ISO-8859-1' , 'UTF-8,ISO-8859-1')); 646 646 } 647 647 else 648 $mailService->addStringAttachment($att['source'], $att['name'], $att['type'], 'base64', isset($att['disposition']) ? $att['disposition'] :'attachment' );648 $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' ); 649 649 unset($att); 650 650 break; … … 652 652 $mbox_stream = $this->open_mbox($value['folder']); 653 653 $rawmsg = $this->getRawHeader($value['uid']) . "\r\n\r\n" . $this->getRawBody($value['uid']); 654 $mailService->addStringAttachment($rawmsg, base64_decode($value['name']), 'message/rfc822', '7bit', 'attachment' );654 $mailService->addStringAttachment($rawmsg, mb_convert_encoding(base64_decode($value['name']), 'ISO-8859-1' , 'UTF-8,ISO-8859-1'), 'message/rfc822', '7bit', 'attachment' ); 655 655 unset($rawmsg); 656 656 break;
Note: See TracChangeset
for help on using the changeset viewer.