summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/kolab_sync_data_email.php13
1 files changed, 2 insertions, 11 deletions
diff --git a/lib/kolab_sync_data_email.php b/lib/kolab_sync_data_email.php
index 8c3a820..9920276 100644
--- a/lib/kolab_sync_data_email.php
+++ b/lib/kolab_sync_data_email.php
@@ -1284,22 +1284,13 @@ class kolab_sync_data_email extends kolab_sync_data implements Syncroton_Data_ID
return '';
}
- if (empty($part->ctype_parameters) || empty($part->ctype_parameters['charset'])) {
- $part->ctype_parameters['charset'] = $message->headers->charset;
- }
-
- // fetch part if not available
- if (!isset($part->body)) {
- $part->body = $message->get_part_content($part->mime_id);
- }
+ $body = $message->get_part_body($part->mime_id, true);
// message is cached but not exists, or other error
- if ($part->body === false) {
+ if ($body === false) {
return '';
}
- $body = $part->body;
-
if ($html) {
if ($part->ctype_secondary == 'html') {
// charset was converted to UTF-8 in rcube_storage::get_message_part(),