Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
patricesoulet
Contributor
Contributor

[resolved] tSendMail : multiple address

Hi,
I try to user tSendMail component (in java, TOS release 2.3.3) from sending mail at two adress.
Adress are in a context variable.
When i use ';' from separate address in context variable for "To" fiel, i have this error :
"tarting job testmail at 17:35 07/07/2008.
Exception in component tSendMail_1
javax.mail.internet.AddressException: Illegal semicolon, not in group in string ``psoulet@domain1.com;psoulet@domain2.fr'' at position 19
at javax.mail.internet.InternetAddress.parse(InternetAddress.java:780)
at javax.mail.internet.InternetAddress.parse(InternetAddress.java:555)
at javax.mail.internet.InternetAddress.<init>(InternetAddress.java:91)
at testmail.testmail.testmail.tSendMail_1Process(testmail.java:172)
at testmail.testmail.testmail.runJobInTOS(testmail.java:360)
at testmail.testmail.testmail.main(testmail.java:261)
Job testmail ended at 17:35 07/07/2008. "
When i use ',', ive this error :
"Starting job testmail at 17:40 07/07/2008.
Exception in component tSendMail_1
javax.mail.internet.AddressException: Illegal address in string ``psoulet@domain1.com;psoulet@domain2.fr''
at javax.mail.internet.InternetAddress.<init>(InternetAddress.java:94)
at testmail.testmail.testmail.tSendMail_1Process(testmail.java:172)
at testmail.testmail.testmail.runJobInTOS(testmail.java:360)
at testmail.testmail.testmail.main(testmail.java:261)
Job testmail ended at 17:40 07/07/2008. "

Any idea ?
Thx
Labels (3)
1 Solution

Accepted Solutions
Anonymous
Not applicable

Hello
See 3822.
There should be a blank space around semicolon, for example:
"psoulet@domain1.com ; psoulet@domain2.fr''
Best regards

shong

View solution in original post

8 Replies
Anonymous
Not applicable

Hello
See 3822.
There should be a blank space around semicolon, for example:
"psoulet@domain1.com ; psoulet@domain2.fr''
Best regards

shong
patricesoulet
Contributor
Contributor
Author

I've test ...
Without context variable, it's ok, but when i use a context variable, i've always the error :
"tarting job envoiMail at 10:36 08/07/2008.
Exception in component tSendMail_1
javax.mail.internet.AddressException: Illegal semicolon, not in group in string ``psoulet@domain1.com ; patrice.soulet@domainn2.fr'' at position 20
at javax.mail.internet.InternetAddress.parse(InternetAddress.java:780)
at javax.mail.internet.InternetAddress.parse(InternetAddress.java:555)
at sugarutilities.envoimail_0_1.envoiMail.tSendMail_1Process(envoiMail.java:184)
at sugarutilities.envoimail_0_1.envoiMail.runJobInTOS(envoiMail.java:377)
at sugarutilities.envoimail_0_1.envoiMail.main(envoiMail.java:275)
Job envoiMail ended at 10:36 08/07/2008.
"
Anonymous
Not applicable

Hello
I have checked that it should be a 4479.
Thanks for your support!
Best regards

shong
patricesoulet
Contributor
Contributor
Author

Thanks, i'll look at bugtracker now.
Regards.
Patrice
Anonymous
Not applicable

It's working for me , here is the steps i followed :
- I created a boolean context variable named Error.
- Then i put a test on tJava component to test then number of rows and put Error on true if the rows == 0.
- Then (see the picture) i put a condition , on a second string context variable Recipients.
- Finaly i put the Recipients variable in the tSendMail
0683p000009MCXO.png 0683p000009MCcw.png
sasi8008
Contributor
Contributor

Hi Largouwalid,
could you please elaborate this ( Then i put a test on tJava component to test then number of rows and put Error on true if the rows == 0.
  - Then (see the picture) i put a condition , on a second string context variable Recipients.)

how to create a boolean context varible named error, condition?
Anonymous
Not applicable

Hi Largouwalid,
could you please elaborate this (Then i put a test on tJava component to test then number of rows and put Error on true if the rows == 0.
  - Then (see the picture) i put a condition , on a second string context variable Recipients.)

how to create a boolean context varible named error, condition?

What is rows in your case? A screenshot of your job will be helpful for us to understand the problem.
sasi8008
Contributor
Contributor

Hi,

How to   database driven to get the email address for tsend component?
Table : email_setting
Project | EmailAddress
==================
ENA    yyyy@xxx.com
Edw xxx@xxx.com
If the job belongs to project then select the project specific email and send email using tsendemail.
If the  job success success send to yyy@xxx.com if job failed send to xxx@xxx.com.
How to implement  this whole process in a joblet?
then how to send multile emails
in my project i have nearly 100 jobs i need to implement this to all job with joblet
Here i have attached some screen shots of my job.
this is  job
========
0683p000009MCd1.png
in this job id  have link(onsubjobok) to tFixedFlowinput .this works when job has success .
i need to create a job success and failed  with single componet
  
in tFxiedflowinput i can retrive Project name using Global variable.
I have lookp with email setting in  tamp  retried  project specific email id
context editor
===========
0683p000009MCYK.png
In tJava component i have write below code
================================

if(context.Job_status != true)
 context.Recipients (String)globalMap.get("fd.email_address"));=====> this is retrived  from tFlowTOItereate component
  else
 context.Recipients="xxxxx@gmail.com";

how to create a joblet for this, when job has success and failed .

Thanks
Sasi