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

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

tSendEmail sending two emails

Hi folks,

 

I have a Talend job that is supposed to catch when there is an exception/failure in a component and send an email, and its working, but it is sending two emails instead of one and I cant figure out why.

 

The job looks like this:

 

[SFTP Connection] --> OnComponentError --> [tLogCatcher --> tFileOutputDelimited] -->OnSubJob Ok--> tSendEmail (with attached file)

 

Picture:

talend_error_06.PNG

 

And whats happening is I get two emails, each with an attached file, the first attachment is empty, and the second one is exactly what I need.

 

Do I have to live with this bug, or is there a solution?

 

- Mikhail Nitko

Labels (2)
3 Replies
Anonymous
Not applicable
Author

Hi Mikhail,

 

      Could you please share the component detail screen shot for the tSendEmail?

 

      One another query is that whether you are having any other tsendEmail component in your job which might be triggering the empty mail. Is the email subject line matching for both the emails?

 

Warm Regards,

 

Nikhil Thampi

Anonymous
Not applicable
Author

Hi nikhilthampi,

 

This is sending two emails whether it is the single component or one of two tSendEmail components.  How do I know this? It is the only tSendEmail component that is supposed to email an attachment, and I get 2 emails, one with a blank attachment and one with the proper error attached.

 

This is the picture of the component details of the tSendEmail:

tSendEmail Contents.JPG

Anonymous
Not applicable
Author

Also, in case this helps. I've developed a sort of "hack" solution that is not a real solution but does the job.

 

And what I do is, in the "tFileOutputDelimited" component, I click the checkbox that says "Don't generate empty file." and what this does is that when tSendEmail goes to send the two emails, one with an empty file and one with the proper file, when it first goes to send the empty file it sends an error, saying "FileNotFoundException", and when it goes to send the proper one right after, it can only send that one.

 

Please note that I'm not deleting the error file after generation, it just somehow makes the first email that gets sent out with the blank attachment fail, and the second email with the proper attachment goes through.

 

From top down, it seems as if the whole tLogCatcher-->tFileOutputDelimited-->tSendEmail process is being triggered twice. Once before the error is visible, and once after.  Cant explain any better.