Four Stars

Problem with string containing Brackets

Hello,
I need some help on what I think is an easy issue.
I have a tSendMail component and I'm trying to write the object of the e-mail as follows: "[EXTERNAL] Attached csv files".

The problem is that when i receive the e-mail the object is the following: "Attached csv files".

The text contained between the brackets disappear, is it normal?
I need to write it in that way and I cannot change the brackets to round brackets.

Could you Help me?
Thank You

12 REPLIES
Twelve Stars TRF
Twelve Stars

Re: Problem with string containing Brackets

Hi,

Did you try "\[EXTERNAL\] Attached csv files" or maybe "\\[EXTERNAL\\] Attached csv files"?


TRF
Four Stars

Re: Problem with string containing Brackets

Hello TRF,
I've tried right now, but it doesn't work.... If I try "\[EXTERNAL\] Attached csv files" the object of the mail that I receive is the same ("\[EXTERNAL\] Attached csv files") and if I write "\\[EXTERNAL\\] Attached csv files" I receive this "\[EXTERNAL\] Attached csv files"...

It's quite strange...

Four Stars

Re: Problem with string containing Brackets

The problem seems related only to this Job....

I've created a separate job to execute on my local machine (the other job is executed on an external server) and here there is no problem if I write in the object "[EXTERNAL] Attached Csv files"....

Do you have any idea on how can I proceed to solve this problem?

Twelve Stars TRF
Twelve Stars

Re: Problem with string containing Brackets

Do you have any idea of the differences between the 2 systems?
OS - version - and so on

TRF
Four Stars

Re: Problem with string containing Brackets

Yes,
the one where I receive the error is Windows Server 2008 R2 and the one that works is Windows 10.

The other difference is that the job executed on the server is executed via command line, and the one executed locally is executed directly from Talend.

The job are created from the same version of Talend that is Talend Open Studio for Data Integration 6.4.

Thank you.


Four Stars

Re: Problem with string containing Brackets

I did some other test and I discovered that this problem happens only when I execute the job from the command line on the server....

If I execute the same job from the command line on my local machine it works fine.

Do you have some idea? 

Four Stars

Re: Problem with string containing Brackets

Hello all,
any news in regards? I'm still having this problem and I'm stuck.....

Thank You

Ten Stars

Re: Problem with string containing Brackets

You can examine the Java code generated by your job to verify that it is setting the string to the value you specify. If the job generates the right string, then the problem may be occurring on the mail server.
Four Stars

Re: Problem with string containing Brackets

@cterenzi
I've added a t_java component and checked how is passed inside the job the object of the email... The object is passed in the right way with the square brackets, so as you said it seems that the problem is on the mail server... The strange thing is that if I write the object as this "[^EXTERNAL^] Attached Files" the E-mail arrives with the same object, but if I write the object as this "[EXTERNAL] Attached Files" the mail arrive with the object "Attached Files"....

Any advice?

Ten Stars

Re: Problem with string containing Brackets

I would contact the mail server admin for assistance.
Four Stars

Re: Problem with string containing Brackets

@cterenzi, do you have any advice on what to ask to the mail server admin?

Ten Stars

Re: Problem with string containing Brackets

Explain your issue to him. You're trying to send emails with a certain subject, and under certain circumstances, the [EXTERNAL] tag is being stripped.