Index: /trunk/prototype/services/ImapServiceAdapter.php
===================================================================
--- /trunk/prototype/services/ImapServiceAdapter.php (revision 6528)
+++ /trunk/prototype/services/ImapServiceAdapter.php (revision 6536)
@@ -630,8 +630,8 @@
{
$body = str_replace('"../prototype/getArchive.php?mailAttachment='.$att['id'].'"', $att['name'], $body);
- $mailService->addStringImage(base64_decode($att['source']), $att['type'], $att['name']);
+ $mailService->addStringImage(base64_decode($att['source']), $att['type'], mb_convert_encoding($att['name'], 'ISO-8859-1' , 'UTF-8,ISO-8859-1'));
}
else
- $mailService->addStringAttachment(base64_decode($att['source']), $att['name'], $att['type'], 'base64', isset($att['disposition']) ? $att['disposition'] :'attachment' );
+ $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' );
unset($att);
@@ -647,8 +647,8 @@
{
$body = str_ireplace('' , '', $body);
- $mailService->addStringImage($att['source'], $att['type'], $att['name']);
+ $mailService->addStringImage($att['source'], $att['type'], mb_convert_encoding($att['name'], 'ISO-8859-1' , 'UTF-8,ISO-8859-1'));
}
else
- $mailService->addStringAttachment($att['source'], $att['name'], $att['type'], 'base64', isset($att['disposition']) ? $att['disposition'] :'attachment' );
+ $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' );
unset($att);
break;
@@ -656,5 +656,5 @@
$mbox_stream = $this->open_mbox($value['folder']);
$rawmsg = $this->getRawHeader($value['uid']) . "\r\n\r\n" . $this->getRawBody($value['uid']);
- $mailService->addStringAttachment($rawmsg, base64_decode($value['name']), 'message/rfc822', '7bit', 'attachment' );
+ $mailService->addStringAttachment($rawmsg, mb_convert_encoding(base64_decode($value['name']), 'ISO-8859-1' , 'UTF-8,ISO-8859-1'), 'message/rfc822', '7bit', 'attachment' );
unset($rawmsg);
break;
Index: /trunk/expressoMail1_2/inc/class.imap_functions.inc.php
===================================================================
--- /trunk/expressoMail1_2/inc/class.imap_functions.inc.php (revision 6528)
+++ /trunk/expressoMail1_2/inc/class.imap_functions.inc.php (revision 6536)
@@ -2923,8 +2923,8 @@
{
$body = str_replace('"../prototype/getArchive.php?mailAttachment='.$att['id'].'"', $att['name'], $body);
- $mailService->addStringImage(base64_decode($att['source']), $att['type'], $att['name']);
+ $mailService->addStringImage(base64_decode($att['source']), $att['type'], mb_convert_encoding($att['name'], 'ISO-8859-1' , 'UTF-8,ISO-8859-1'));
}
else
- $mailService->addStringAttachment(base64_decode($att['source']), $att['name'], $att['type'], 'base64', isset($att['disposition']) ? $att['disposition'] :'attachment' );
+ $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' );
$message_size_total += $att['size'];
@@ -2941,8 +2941,8 @@
{
$body = str_ireplace('' , '', $body);
- $mailService->addStringImage($att['source'], $att['type'], $att['name']);
+ $mailService->addStringImage($att['source'], $att['type'],mb_convert_encoding($att['name'], 'ISO_8859-1' , 'UTF-8,ISO_8859-1') );
}
else
- $mailService->addStringAttachment($att['source'], $att['name'], $att['type'], 'base64', isset($att['disposition']) ? $att['disposition'] :'attachment' );
+ $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' );
$message_size_total += $att['size']; //Adiciona o tamanho do anexo a variavel que controlao tamanho da msg.
@@ -2952,5 +2952,6 @@
$mbox_stream = $this->open_mbox($value['folder']);
$rawmsg = $this->getRawHeader($value['uid']) . "\r\n\r\n" . $this->getRawBody($value['uid']);
- $mailService->addStringAttachment($rawmsg, base64_decode($value['name']), 'message/rfc822', '7bit', 'attachment' );
+
+ $mailService->addStringAttachment($rawmsg, mb_convert_encoding(base64_decode($value['name']), 'ISO-8859-1' , 'UTF-8,ISO-8859-1'), 'message/rfc822', '7bit', 'attachment' );
$message_size_total += mb_strlen($rawmsg); //Adiciona o tamanho do anexo a variavel que controlao tamanho da msg.
unset($rawmsg);