Issue in bulk email download

Issue #486 resolved
Kishor created an issue

I am using latest master version of piler and observed issue in 'bulk download selected email' option. Downloaded zip file contains journal envelope messages instead of actual emails.

Single message download is working fine.

Appreciate if you could check this.

Regards, Kishor

Comments (12)

  1. Janos SUTO repo owner

    Can you select 3-4 emails, and download the zip file, then send it to me please. Don't attach it here, rather get my email from piler -v

  2. Kishor reporter

    Just sent zip file. i have observed that emails exported by 'pilerexport' also has this issue.

    Thanks, Kishor

  3. Janos SUTO repo owner

    Yes, now I have, and you are right. In case of the zip file, the journal part is not stripped. I'll fix it soon, thanks for your patience.

  4. Janos SUTO repo owner

    The zip download code missed the journal stripping function call. Now it's fixed. Apply the following diff:

    diff --git a/webui/model/message/restore.php b/webui/model/message/restore.php
    index f4e1802..6f17066 100644
    --- a/webui/model/message/restore.php
    +++ b/webui/model/message/restore.php
    @@ -20,6 +20,8 @@ class ModelMessageRestore extends Model {
    
              $rawemail = $this->model_search_message->get_raw_message($piler_id);
    
    +         $this->model_search_message->remove_journal($rawemail);
    +
              $zip->addFromString($piler_id . ".eml",  $rawemail);
    
              AUDIT(ACTION_DOWNLOAD_MESSAGE, '', '', $id, '');
    
  5. Log in to comment