Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have created a JOb Tfilelist----->tfileinputdelimited-->tJavarow
|
|
Tsendmail
1 have 2 files and in 1 file there are multiple rows and in 2nd file 1 row. System is sending 2 Mails with content as 2 and other file with 3 content , but i need to send 2 mails i.e file wise . Can you help me in achieve that .
Hi,
The description given is slightly confusing. Could you please rephrase the description of this problem?
In between, are you trying to achieve the same logic what you have asked in your other post in a different way? If yes, I have added one logic in your other post and I am adding the link here.
Warm Regards,
Nikhil Thampi
Nikhil its different ....There are 2 files in Folder having below content .....
file A
row 1 -- (A,VIJAY,dahiya.vijay@gmai.com).
row2 -- (A,DAHIYA,dahiya.vijay@gmai.com)
File B.
row 1 -- (B,VD,vd@yahoo.com)
now i need to send content of above 2 files in mail body . 1st Mail will have FILE A content and 2nd Mail will be have File 2 Content .
I tried by system is sending all the 3 content in single mail it is not sending file by file .
Hi,
For each iteration, you can read the content of a file to a variable (for example String) and use that String variable to deliver the content in tsendmail component.
Below link can help you to understand how to read the entire file and capture it to a string variable. But please have an eye on the upper threshold limit of String variable.
https://howtodoinjava.com/java/io/java-read-file-to-string-examples/
I hope the idea has helped to find way ahead for your query. Could you please mark the topic as resolved if the answer has helped you. Kudos are also welcome 🙂
Warm Regards,
Nikhil Thampi
Nikhil it is too big way to do that , is it not possible i read 1 file at a time and send
@nthampi wrote:
Hi,
For each iteration, you can read the content of a file to a variable (for example String) and use that String variable to deliver the content in tsendmail component.
Below link can help you to understand how to read the entire file and capture it to a string variable. But please have an eye on the upper threshold limit of String variable.
https://howtodoinjava.com/java/io/java-read-file-to-string-examples/
I hope the idea has helped to find way ahead for your query. Could you please mark the topic as resolved if the answer has helped you. Kudos are also welcome 🙂
Warm Regards,
Nikhil Thampi
those content by mail and delete that file and again read next file .
Hi,
Could you please share the job you have created and the error you are getting?
Warm Regards,
Nikhil Thampi
PFA the screen shot below first Records are getting generated and 2 File are getting created and then next job they are getting send . Is it possible to do below :
Fetch Records ( multiple records ) based on email id ---> send mail-->delete file (continue same for other customers )
Currently i am fetching records -->sending to file and multiple file are getting created based on mail id --> sending those to customer .