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

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Send bulk email using tsendmail component

Dear sanvaibhav,
I have a job requirement in which i have to take email ids from the excel sheet and send the email notification to that email ids.
excel sheet is containing list of email ids.
Regards,
Csah
Labels (2)
16 Replies
Anonymous
Not applicable
Author

In your first job -
tPreJob-->OnComponentOk-->tJava
YourJob-->Follows-->here
Anonymous
Not applicable
Author

Hi Vaibhav ,
Good Morning....

I am able to generate the log file of the talend job but when i am executing the .bat (Standalone execution) then i am not able to generate the log file..
Regards,
Csah
Anonymous
Not applicable
Author

I think you are missing something...
Have you checked the validation for directory creation... directory is not created because it does not exists...
java.io.File log_folder = new java.io.File(System.getProperty("user.dir")+"/_logs1/");
if (!log_folder.exists())
{
if (log_folder.mkdir())
{
//System.out.println("Directory is created!");
}
else
{
//System.out.println("Failed to create directory!");
}
}
java.io.File logFile = new java.io.File(System.getProperty("user.dir")+"/_logs1/"+projectName+".log");
java.io.PrintStream ps = new java.io.PrintStream(new java.io.FileOutputStream(logFile));
System.setOut(ps);
System.setErr(ps);

This works... I tested again for your.
Thanks
Vaibhav
Anonymous
Not applicable
Author

Thanks vaibhav ,

Every thing is working fine...
Now i have one more requirement let support i want the log of the failed email ids means that email id in which the notification mail has not sent by the job due to any reason..

Thanks in advance..
Regards,
Csah
Anonymous
Not applicable
Author

tSendMail would send mail for every mail ID. Mail server sends the mail, but it may turn out to be not delivered due to mail ID problem. This returned mail is available in Inbox.
You can write another job to read the mails from this mailbox using tpop and check for failure mails.
Another way could be to use OnSubJobError for tSendMail, you can get the error generated for particular mail ID.
Vaibhav
Anonymous
Not applicable
Author

Thanks vaibhav

one more thind i am not able to send the mail when i am using the ip address in place of the smtp host and port number is 25.

i am gettind error "Unrecognized SSL message, plaintext connection?"

please do the needful.
regards,
Csah
Anonymous
Not applicable
Author

Whether you are able to connect to the mail server using IP. Usually the mail server is like smtp.mail.com...
Whether SSL configuration is required for your mail serve?
Check your mail server settings..
Refer to https://help.talend.com/search/all?query=tSendMail&content-lang=en
Vaibhav