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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Jennifer_siders
Contributor III
Contributor III

Send Email with Attachment

Hello All,

We have a simple requirement to pick a file from a folder and send it as an email attachment. Once the email with the attachment is sent, then we would like to move the file to a different location using 'tFileCopy' . My problem, is I only get emails without an attachment first, and later on, on an intermittent basis receive one more email with an attachment.

tFIleList ---> tSendEMail

If condition to trigger email only when there is a file ((Integer)globalMap.get("tFileList_2_NB_FILE"))!=0

0695b00000Gfa6GAAR.png

tSendEmail:

0695b00000Gfa4AAAR.png

tFileCopy:

0695b00000Gfa4UAAR.png

Labels (3)
1 Solution

Accepted Solutions
Anonymous
Not applicable

Make sure the file is sent as attachment before it is removed, I would suggest you to move tFileCopy after tSendMail component, eg:

tFileList-iterate--tSendMail--oncomponentok--tFileCopy.

View solution in original post

4 Replies
gjeremy1617088143
Master
Master

Hi,

TfileList-->iterate link -->tJava with this code: globalMap.put("filePath",(String)globalMap.get("tFileList_2_CURRENT_FILEPATH"));

followed by two trigger links

after the tjava one for send mail an other for file copy with this condition (String)globalMap.get("filePath") != null

and you use (String)globalMap.get("filePath") in the two components.

Maybe you don't need an itermediary variable (here filePath) and you can use (String)globalMap.get("tFileList_2_CURRENT_FILEPATH") everywhere.

Send me Love and Kudos

Anonymous
Not applicable

Make sure the file is sent as attachment before it is removed, I would suggest you to move tFileCopy after tSendMail component, eg:

tFileList-iterate--tSendMail--oncomponentok--tFileCopy.

Jennifer_siders
Contributor III
Contributor III
Author

Hi @Shicong Hong​  Thanks it worked as a charm.

Jennifer_siders
Contributor III
Contributor III
Author

Thanks @guenneguez jeremy​ for the response. I couldn't try your solution, but has helped me for implementing a other requirement 🙂