Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Nicolas661
Contributor
Contributor

Attachments in tSendMail

Hi,
I try to make a job:
Read Directory----Iterate---> Send a mail with attachments (all docs read in directory)

I try with:
tFileList-->tSendMail with the value " ((String)globalMap.get("tFileList_1_CURRENT_FILEPATH"))" in attachment
The result is: X files send X mails with attachment.
All documents are not in only 1 mail

Nicolas
PS: I'm beginner in Talend DI
Nicolas
Labels (2)
15 Replies
Loneliness
Contributor
Contributor

It's normal because an Iterate" connection between the 2 components means that tSendMail will be triggered once for each file in that folder.
The first solution i can suggest is to use a tFileArchive component to zip your files, connect it to tSendMail component with the OnSubjobOk trigger and in the Attachment section, you will type: ((String)globalMap.get("tFileArchive_1_ARCHIVE_FILEPATH")) as the attached file.
This way you will send only one email with all your files.
Regards
AH.
alevy
Specialist
Specialist

I believe you can just use a filemask in tSendMail i.e. you don't need tFileList at all.
Nicolas661
Contributor
Contributor
Author

The 2 solutions are avalaible:
The first (with TfileArchive): Connect the tfileArchive to tSendMail
In the attachment file: ((String)globalMap.get("tFileArchive_2_ARCHIVE_FILEPATH"))
The second:Just add the directory of files in the attachments
Thank you alevy & cheaito
Anonymous
Not applicable

Hi,
Actually, so far tsendmail only support for file mask with a directory without filter on file type. That means "D:/folder2/" is OK not "D:/folder2/*.txt".
Best regards
Sabrina
Anonymous
Not applicable

Could we have an inline attachment in message body instead of attachment section using tsendmail component ?
Anonymous
Not applicable

Hi,
Could we have an inline attachment in message body instead of attachment section using tsendmail component ?

For the inline attachment in message body, could you give more information and elaborate your case with an example to us?
Best regards
Sabrina
Anonymous
Not applicable

Well example could be as simple as any .tsv / .csv report that is generated with header and data already available in some location and we would like to have them displayed in the body instead of as an attachment.
Anonymous
Not applicable

Hi,
Well example could be as simple as any .tsv / .csv report that is generated with header and data already available in some location and we would like to have them displayed in the body instead of as an attachment.

It seems you want to put the .tsv / .csv file/file path in Message Body of tsendmail?
Best regards
Sabrina
Anonymous
Not applicable

Yes , with the content (not just the file name / path ) . If it's not something supported i would really appreciate work arounds ?