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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

tSendMail error on message newline

Hello,
I use a tSendMail component and i have a problem with message content.
In my message, when there is a new ligne there is a java error in source code.
So, I replace new ligne by \n and it's OK.
How i can replace new line by \n automatically ? ( or it's an option in settings )
Message content OK
"Hello,"
+"\n\nWorld"
Message content NOK
"Hello,"
World"
Thanks !
Arnaud
Labels (3)
7 Replies
Anonymous
Not applicable
Author

Hi Arnaud,
Talend can't change new line char automatically in tSendMail component, we have to specify it manually...
if required, during data flow you can replace some char by using EReplace or tReplace or regular expression by \n but for this also you need to define some rule... this can't happen automatically.
vaibhav
Anonymous
Not applicable
Author

Hi,
You can set your message as Context Vaule then sending them to tSendMail.
Please see my Screenshots
Let me know if it is OK with you.
Best regards
Sabrina
0683p000009MEKn.png 0683p000009MEWI.png 0683p000009MEXb.png
Anonymous
Not applicable
Author

Hi,
You can see my screeshots.
This email is sending at the end of the job. The message content is just text and not a result of an another component.
There is code on error component :
String message_tSendMail_2 = (("Bonjour
Le replay est terminé.") == null || "".equals("Bonjour
Le replay est terminé.")) ? "\"\"" : ("Bonjour
Le replay est terminé.") ;
You can see newline is not replace by \n automaticaly.
I use TOS 5.5.1, may be it's a bug ?
However, I use the button "..." at the right textarea message content because I thought, when the popup message content is validate, Talend replace newline by \n
Thanks for your help,
Arnaud
0683p000009MDaF.png 0683p000009MEXu.jpg
Anonymous
Not applicable
Author

I use Talend Open Studio for Data Integration Version 6.0.1 and have the same problem.
In the component tSendMail (Message) is it not possible to use a new line with \n or "|" or whatever.
In Talend Version 5.X thats was no problem.

0683p000009MEaE.jpg
Anonymous
Not applicable
Author

Hi blub,
Would you mind showing us your the screenshot of message part in tSendMail component?
Best regards
Sabrina
Anonymous
Not applicable
Author

I know this is an old thread but i am trying to do this and I am having trouble with the following...
You can set your message as Context Vaule then sending them to tSendMail.
Please see my Screenshots

 How do I set the results of tFixedFlowInput to a context variable?  I am not seeing the results of tFixedFlowInput when I hit ctl+space
Anonymous
Not applicable
Author

I accomplished this using tJava instead of tFixedFlow