One Star

tSendMail with Variables

Hi
I want to manage the errors in my job. If the execution generate an error, a mail is sent to the manager. To do this, I use the component tSendMail. In the job I need 2 tSendMail.
I would like to insert the content of a variable in the mail but I don't know how to create an variable and insert it in the mail. I try to use "Var" in the tMap but I don't succeed.
How can I do it?
I'm using TOS 2.1 M1 with a java project
Thanks a lot
7 REPLIES
Employee

Re: tSendMail with Variables

Hello
You can use either tJava or tJavaFlex
in begin part :
int myVariable = 0;
One Star

Re: tSendMail with Variables

Hi
Thanks for your answer
How can I get myVariable in tSendMail?
Employee

Re: tSendMail with Variables

For example : tSendMail Message :
"Hello" +myVariable
One Star

Re: tSendMail with Variables

Hi
it isn't tJavaFlex --> tSendMail ? I try your example but I not succeed...
For example, a part of my job is tOracleInput --> tMap --> tOracleOutput --(on error)--> tSendMail
How can I use a field of tOracleOutput in the tSendMail ?
Thanks
One Star

Re: tSendMail with Variables

Excuse me
I succeed your job (i told you no because an error message was near the component)
One Star

Re: tSendMail with Variables

I need to include the remote host and local file path in the tSendmail. How do I retrieve these variables and insert them in the mail?
Community Manager

Re: tSendMail with Variables

Hello
I need to include the remote host and local file path in the tSendmail. How do I retrieve these variables and insert them in the mail?

Just write them in message filed directly.
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business