Titanium JIRA Archive
Appcelerator Community (AC)

[AC-4785] Open/ Read .msg and .eml file in Android and iOS.

GitHub Issuen/a
TypeNew Feature
Priorityn/a
StatusResolved
ResolutionWon't Fix
Resolution Date2017-02-10T13:15:32.000+0000
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
Labelsn/a
ReporterPrafulla Bansode
AssigneeShak Hossain
Created2017-02-10T12:51:00.000+0000
Updated2017-02-11T19:24:46.000+0000

Description

We are developing app in which we are receiving the attachments of the type .msg and .eml. We have to provide the feature where user can open and read the attachments. But we don’t see support in the documentviewer API call, is there any work around for the same? Currently, as there is no API for this to handle. we are considering it as the bug.

Comments

  1. Hans Knöchel 2017-02-10

    There is no native API (neither in iOS nor in Android) to expose this functionality. So you either have to parse the files on the server and return a HTML page that displays the content or do a feature-request at Apple and Google to expose this functionality. Of course this is a new feature and not a bug. Example (https://code.google.com/archive/p/php-mime-mail-parser / PHP):
       <?php
       require_once('MimeMailParser.class.php');
       
       $path = 'path/to/mail.txt'; 
       $Parser = new MimeMailParser(); 
       $Parser->setPath($path);
       
       $to = $Parser->getHeader('to'); 
       $from = $Parser->getHeader('from'); 
       $subject = $Parser->getHeader('subject'); 
       $text = $Parser->getMessageBody('text'); 
       $html = $Parser->getMessageBody('html'); 
       $attachments = $Parser->getAttachments();
       
       echo json_encode(array(
           'to' => $to,
           'from' => $from,
           'text' => $text,
           'html' => $html,
           'attachments' => $attachments,
       ));
       ?>
       
    Resolving until the native SDK's support this functionality.

JSON Source