Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
AndreK
Contributor III
Contributor III

tfileinputmail attachments with same filenames

Dear experts,

 

I have to download the mail(imap) and extract the attachments: tpop --(iterate)-> tfilelist--(iterate)>tfileInputMail it is working.

But now I have an issue, if the mail includs multiple attachments with the same filename (123.pdf and 123.pdf).

By downloading last file overwrite the first file.

 

How can I resolve this issue ?

Labels (2)
14 Replies
manodwhb
Champion II
Champion II

Yes it will override, so you need to rename the file after tfileinput mail component use tfilecopy component.
AndreK
Contributor III
Contributor III
Author

Thank you for your quick reply.
But unfortunately if I'm using:
tFileInputMail--Main-->tFileList --> then it would be already overwirte
tFileInputMail--On Component Ok-->tFileList --> then it would be already overwirte
tFileInputMail--Iterate->tFileList --> then it would be already overwirte and it doesn't trigger the next component

How can I trigger next component after the download of the first attachment ?
manodwhb
Champion II
Champion II

After tfileinputmail ,can you connect tfilecopy and try to rename,check that is that working.
AndreK
Contributor III
Contributor III
Author

which filename I can use in this case ?

If I connect tfileinputmail -->tFileList-->tfilecopy then the file will be overwritten.


tFileInputMail.jpg
manodwhb
Champion II
Champion II

Check the file name which you're downloading as a global variable in the tfileiputmail.
AndreK
Contributor III
Contributor III
Author

how or where I can do this ?
AndreK
Contributor III
Contributor III
Author

Does anyone have a solution ?

Anonymous
Not applicable

Unless you modify the source code of tFileInputMail, I am afraid there is no other solution.

Regards
Shong
AndreK
Contributor III
Contributor III
Author

does talend have other components that can be used to extract the attachment ?