Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: Reading emails and saving in proper HTML format

  1. #1
    Join Date
    Nov 2014
    Posts
    15

    Default Reading emails and saving in proper HTML format

    Hi guys,

    I am trying to read emails and save email in HTML format using Job's Get mails (POP3/IMAP) task. As shows in below screenshot, I have given target filename pattern as saving in HTML format.
    Name:  Get emails from POP - Target settings.jpg
Views: 469
Size:  13.3 KB
    But I see if I open the saved html file, it's not in proper HTML format. My email is having Image pasted in Body part, as shown in below screen.
    Name:  Sample Email.jpg
Views: 555
Size:  36.1 KB

    If I open saved HTML file in browser, it doesn't open.

    Any pointers, How do I save Email in Proper HTML format?
    Thanks,
    Nilesh

  2. #2
    Join Date
    Nov 2014
    Posts
    15

    Default

    Got answer...Used transformations' 'Email messages Input' task and get the Body of email. Then use Job's 'Get mails (POP3/IMAP)' task and get all attached images. Then in Body part find the content id and then for that content id find the correct image. Convert image into base64 and replace it in main Body part. You need to use user defined java class to perform these operations.

  3. #3
    Join Date
    Apr 2014
    Posts
    14

    Default

    Hi nileshnaseet,


    Is there any list of parameters which we can use in "Email_{SYS|hhmmss_MMddyyyy|}_#IdFile#.mail" (In Target Filename Pattern field, in your first screenshot), on the place of "#IdFile#"?


    So I am trying to provide a Unique Identifier of Email in its attachments, which should be generated on google server. Is there any such parameter by which I can get that Identifier in place of "#IdFile#" except Message Number?
    Here Message Number is just a sequence that depends on the Gmail Folder (Label) in which that mail stored. And these can be changed for same mail under different labels.


    Thanks,
    Last edited by rahitridev; 05-16-2017 at 10:47 AM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.