Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
HoS1
Contributor III
Contributor III

tFileInputMail fetch IMAP Mails with Multipart Bodies

Hi,

i need a job to store E-Mails and their attachments into our oracle database. I followed the example with tPop->tFileList->tFileInputMail and it seems to work. But what i need is the actual mail-body (if it's multipart, then at least the html-body). And i need a solution to keep the attachments "linked" to the mail-file. I can not find a solution to make the ATTACHMENT_PATH dynamic, so that we later find any attachments to the specific mail they belong. Will this be possible and if, could somebody show me how?

Kind regards

Holger

Labels (2)
4 Replies
Anonymous
Not applicable

Hi

Have a try to store the attachments to corresponding folder, set a dynamic attachment export folder, eg:

"D:/talend/product/801/tos8/studio/workspace/"+((String)globalMap.get("tFileList_1_CURRENT_FILE"))

Regards

Shong​

HoS1
Contributor III
Contributor III
Author

Hi,

 

OK dynamic attachments folder is working fine. Do you have an idea how to extract the Body-Part out of the E-Mail?

 

Kind regards

Holger

Anonymous
Not applicable

To read the body part of an email, define a column called body on the schema, and set it's mapping field as "body" in the mapping table. I'm not sure if I understand your question well. If not, can you explain it with a bit details?

 

Regards

Shong

 

HoS1
Contributor III
Contributor III
Author

Hi Shong,

 

i found out myself. In tFileInputMail one has to define two columns (e.g. Body and HTMLBody) and then enter "Body" and "HTMLBody" as mal part accordingly.

 

What i didn't get out of the emails are inline attachments.

 

Any hint?

 

Kind regards