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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

[resolved] If job fails send an email

Hi,
I have primary key constraints and I want Talend to send me an email whenever any duplicates come in. Below is my job architecture. I have `unchecked` Die On Error for all components. Even after the job fails since there are duplicates coming in the database, I do not get any email notifications. Can someone please provide headway on this issue.
0683p000009MDYm.png
I am using outlook and my settings are as below. I do not know what the SMTP Host and the SMTP port so I am leaving it as the default settings.
0683p000009MDac.png
Thanks in Advance,
CG
  
Labels (2)
1 Solution

Accepted Solutions
vapukov
Master II
Master II

You can test:
"Hello Colleen, a duplicate in the file has been spotted. The Duplicate value is "+row3.Last_Name_First_Name+", "+row3.Address_of_New_Home+" and "+row3.Week+". Please have a take a look at it. Thanks".

I not test it, but if will not work with flow - insert in middle (between tMap and tSendMail) - tFlowToIterate, and use in text
"bla-bla-bla ... "+((String)globalMap.get("var_name"))+"... bla-bla-bla"

this is will work exactly

View solution in original post

8 Replies
cterenzi
Specialist
Specialist

SMTP Host is the hostname or IP address of your mail server.  25 is the default network port for SMTP communication.
If you have not changed those values to the values you use to send mail, tSendMail will not work.  
Anonymous
Not applicable
Author

Thanks,
I have updated my tSendMail with the accurate Host and Port. I even tried out the Host and Port with a simple job. But the problem remains, I am unable to receive the email from Talend.
0683p000009MB7V.png
I am emulating my process from the details from the link.
https://community.talend.com/t5/Design-and-Development/resolved-Email-notification-in-case-of-job-fa...
Please provide assistance.
Thanks,
CG
vapukov
Master II
Master II

If You look at Your Reject output, You can see - on both Your screenshots it 0 (or empty)
It mean - tMap not send rows to Reject flow, and Your tWarm not fire
as result - tLogCatcher - not fire as well

Check tMap - why it not send rejected flow?
Handle duplicates by other method

Just add - tMap do not reject nothing without Lookup JOIN.
and You Job do not have any one.
in this case tMap can send something to Your rejected output only based on some filters or function - if You use any of them, check why they not work. 
Anonymous
Not applicable
Author

Thanks, I have figured out another way to email myself the error.
0683p000009MDaT.png  
As you can see the there is one duplicate value and I received an email from Talend as well fortunately. 
This is my current message in the body of the tSendMail. 
"Hello Colleen, a duplicate in the file has been spotted. Please have a take a look at it. Thanks". 
I want to send three columns from the duplicated value ("Last_Name_First_Name", "Address_of_New_Home" and "Week") in the message in the tSendMail. My message in the body be:
"Hello Colleen, a duplicate in the file has been spotted. The Duplicate value is "Last_Name_First_Name", "Address_of_New_Home" and "Week". Please have a take a look at it. Thanks". 
Please provide assistance.
Thanks,
CG
vapukov
Master II
Master II

You can test:
"Hello Colleen, a duplicate in the file has been spotted. The Duplicate value is "+row3.Last_Name_First_Name+", "+row3.Address_of_New_Home+" and "+row3.Week+". Please have a take a look at it. Thanks".

I not test it, but if will not work with flow - insert in middle (between tMap and tSendMail) - tFlowToIterate, and use in text
"bla-bla-bla ... "+((String)globalMap.get("var_name"))+"... bla-bla-bla"

this is will work exactly
Anonymous
Not applicable
Author

Thanks so much Vapukov, worked like a treat!!!!
Anonymous
Not applicable
Author

How to give the path of the file in the tsendmail component. Its giving me error. please help
0683p000009MDah.png
vapukov
Master II
Master II

How to give the path of the file in the tsendmail component. Its giving me error. please help
415061/mini_blob_20170308-1213.png

remove / from the end