One Star

Send Mail to Multiple Address

Someone can help me to use tSendMail if i would send one mail to multiple address?
How can I put multiple address in TO BOX of tsendMail component?
23 REPLIES
One Star

Re: Send Mail to Multiple Address

use address1 space ; space address2
ex "p1@domain1.com ; p2@domain1.com ; p3@domain2.com"
One Star

Re: Send Mail to Multiple Address

I have something like 14000 address in a db table or in a file delimited how can itarate???
One Star

Re: Send Mail to Multiple Address

that would be a lot of semi-colons Smiley Tongue
This example uses MySQL, but you can modify it for your database.
tMySQLInput_1 -- > tFlowToIterate --> tSendMail
In tFlowToIterate uncheck "Use the default (key, value) in global variables" and create a key called "email_address", that is set to the email address field from your database input.

In the To field of tSendMail use: (String)globalMap.get("email_address")
One Star

Re: Send Mail to Multiple Address

"Agt_doc Process Failed at agt_spDocReport_Cat1;
Error message : ((String)globalMap.get("tRunJob_1_ERROR_MESSAGE"))"
This is what iam using in my tsendemail Message box . I am getting an error
Syntax error on tokens, delete these tokens
How do i resolve this. Please let me know
Moderator

Re: Send Mail to Multiple Address

Hi wind,
Please switch "Designer" to the "Code" tab to check the compile error "Syntax error on tokens, delete these tokens".
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Seven Stars

Re: Send Mail to Multiple Address

Try
"Agt_doc Process Failed at agt_spDocReport_Cat1;
Error message : "+((String)globalMap.get("tRunJob_1_ERROR_MESSAGE"))
One Star

Re: Send Mail to Multiple Address

Here i am attaching a simple job using one tsend mail and i am getting this error.

Exception in component tSendMail_1
javax.mail.MessagingException: Exception reading response;
nested exception is:
javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
at com.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java:1462)
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1260)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:370)
at javax.mail.Service.connect(Service.java:297)
at javax.mail.Service.connect(Service.java:156)
at javax.mail.Service.connect(Service.java:105)
at javax.mail.Transport.send0(Transport.java:168)
at javax.mail.Transport.send(Transport.java:98)
at test.tpop_test_0_1.tpop_test.tSendMail_1Process(tpop_test.java:434)
at test.tpop_test_0_1.tpop_test.runJobInTOS(tpop_test.java:647)
at test.tpop_test_0_1.tpop_test.main(tpop_test.java:513)
Caused by: javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readDataRecord(Unknown Source)
at com.sun.net.ssl.internal.ssl.AppInputStream.read(Unknown Source)
at com.sun.mail.util.TraceInputStream.read(TraceInputStream.java:97)
at java.io.BufferedInputStream.fill(Unknown Source)
at java.io.BufferedInputStream.read(Unknown Source)
at com.sun.mail.util.LineInputStream.readLine(LineInputStream.java:75)
at com.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java:1440)
disconnected
... 10 more
Caused by: java.io.EOFException: SSL peer shut down incorrectly
at com.sun.net.ssl.internal.ssl.InputRecord.read(Unknown Source)
... 19 more
Moderator

Re: Send Mail to Multiple Address

Hi deba2193,
Caused by: javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake

How did you set your tsendmail component? The port is? Please upload your component setting screenshot into forum so that we can address your issue quickly.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: Send Mail to Multiple Address

i am having only one tSendmail component that's it....
i am not able to upload the images anyway
to :"debashis@test.com"
from: "debashis@test.com"
show sender name : checked
sender name : "debashis"
smtp host: "smail.test.com"
smtp port :300
ssl report :checked
need authentication :checked
die on error :checked
username: debashis@test.com
password: mypass
Moderator

Re: Send Mail to Multiple Address

Hi,
I have made a testing and everything is OK. Could you please check your setting? (smtp host: "smail.test.com"
smtp port :300)
In addition that, please click on "post reply" (not through the quick post") to upload your screenshots into forum.
Pay close attention on the limitation(20 images per post, each image must be less then 1024x768 pixels and 200 KB, png is preferred)

Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.

Re: Send Mail to Multiple Address

Hi
My requirement is from more than one mysql table i have to take the details of the student
like name|roll_no|marks|email_id
and i have to send a notification email to the student whose marks is less than 50.
i am using gmail as smtp server.
Please do the needful.
Regards,
Chandan Kumar Sah
Moderator

Re: Send Mail to Multiple Address

Hi,
For your goal, you can use tfilterrow to filter the student whose marks is less than 50 then set email.
To make it clear, I have designed a simple demo job: tfileinputxxx-->tfilterrow-->filter-->tflowtoiterate-->tfixedflowInput-->tsendmail
-->reject-->tfileoutputxxx
See my screenshots for detail
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Six Stars

Re: Send Mail to Multiple Address

Hi,
Please find the screenshots which are just samples of your requirements.
Hope this should get you started.
sorry, for images are not in order.
Thanks,
Jagadish.
Moderator

Re: Send Mail to Multiple Address

Hi Chandan Kumar Sah,
Is it working for your current job requirement?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.

Re: Send Mail to Multiple Address

Hi Xdshi,
In my job there is only one tsend mail component by which i am trying to send mail.
in which i am using my gmail id to send the mail.
gmail server setting is :
smtp server--- "smtp.gmail.com"
port- 465
ssl support- Checked
Need authentication-- checked
in which i have mentioned my gmail id and password
after running the job i am getting the below error
please do the needful.
Regards
Chandan
-----------------------------------------------------------------------------------------------------------------------------------
Exception in component tSendMail_1
javax.mail.MessagingException: Exception reading response;
nested exception is:
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at com.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java:1462)
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1260)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:370)
at javax.mail.Service.connect(Service.java:297)
at javax.mail.Service.connect(Service.java:156)
at javax.mail.Service.connect(Service.java:105)
at javax.mail.Transport.send0(Transport.java:168)
at javax.mail.Transport.send(Transport.java:98)
at orange_tsv.test_0_1.test.tSendMail_1Process(test.java:446)
at orange_tsv.test_0_1.test.runJobInTOS(test.java:664)
at orange_tsv.test_0_1.test.main(test.java:529)
Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
disconnected
at sun.security.ssl.Alerts.getSSLException(Unknown Source)
at sun.security.ssl.SSLSocketImpl.fatal(Unknown Source)
at sun.security.ssl.Handshaker.fatalSE(Unknown Source)
at sun.security.ssl.Handshaker.fatalSE(Unknown Source)
at sun.security.ssl.ClientHandshaker.serverCertificate(Unknown Source)
at sun.security.ssl.ClientHandshaker.processMessage(Unknown Source)
at sun.security.ssl.Handshaker.processLoop(Unknown Source)
at sun.security.ssl.Handshaker.process_record(Unknown Source)
at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
at sun.security.ssl.SSLSocketImpl.readDataRecord(Unknown Source)
at sun.security.ssl.AppInputStream.read(Unknown Source)
at com.sun.mail.util.TraceInputStream.read(TraceInputStream.java:97)
at java.io.BufferedInputStream.fill(Unknown Source)
at java.io.BufferedInputStream.read(Unknown Source)
at com.sun.mail.util.LineInputStream.readLine(LineInputStream.java:75)
at com.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java:1440)
... 10 more
Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at sun.security.validator.PKIXValidator.doBuild(Unknown Source)
at sun.security.validator.PKIXValidator.engineValidate(Unknown Source)
at sun.security.validator.Validator.validate(Unknown Source)
at sun.security.ssl.X509TrustManagerImpl.validate(Unknown Source)
at sun.security.ssl.X509TrustManagerImpl.checkTrusted(Unknown Source)
at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source)
... 23 more
Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(Unknown Source)
at java.security.cert.CertPathBuilder.build(Unknown Source)
... 29 more
Moderator

Re: Send Mail to Multiple Address

Hi Chandan,
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

The error indicates that something wrong your certification(The server certification is expire or not to be trusted?).
Please check the related article http://stackoverflow.com/questions/6908948/java-sun-security-provider-certpath-suncertpathbuilderexc....
You can use TalendHelpCenter:tSetKeystore to import the certification.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.

Re: Send Mail to Multiple Address

Hi Xdshi,
Thanks for your quick reply...
could you please elaborate the steps to solve this problem..

Thanks in advance...
Regards,
Chandan
Moderator

Re: Send Mail to Multiple Address

Hi,
Firstly, you should understand how to create Keystore and Truststore file.
Please refer to article http://www.techbrainwave.com/?p=953.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.

Re: Send Mail to Multiple Address

Hi Xdshi,
Sorry for the late reply...actually i was busy in other project..
my concern is when i am executing the job through internet dongle then the job is working fine but when i am executing the job through the secure LAN then it giving error
Exception in component tSendMail_1
javax.mail.MessagingException: Exception reading response;
nested exception is:
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at com.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java:1462)
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1260)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:370)
at javax.mail.Service.connect(Service.java:297)
at javax.mail.Service.connect(Service.java:156)
at javax.mail.Service.connect(Service.java:105)
at javax.mail.Transport.send0(Transport.java:168)
at javax.mail.Transport.send(Transport.java:98)
at orange_tsv.test_0_1.test.tSendMail_1Process(test.java:446)
at orange_tsv.test_0_1.test.runJobInTOS(test.java:664)
at orange_tsv.test_0_1.test.main(test.java:529)
Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
disconnected
at sun.security.ssl.Alerts.getSSLException(Unknown Source)
at sun.security.ssl.SSLSocketImpl.fatal(Unknown Source)
at sun.security.ssl.Handshaker.fatalSE(Unknown Source)
at sun.security.ssl.Handshaker.fatalSE(Unknown Source)
at sun.security.ssl.ClientHandshaker.serverCertificate(Unknown Source)
at sun.security.ssl.ClientHandshaker.processMessage(Unknown Source)
at sun.security.ssl.Handshaker.processLoop(Unknown Source)
at sun.security.ssl.Handshaker.process_record(Unknown Source)
at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
at sun.security.ssl.SSLSocketImpl.readDataRecord(Unknown Source)
at sun.security.ssl.AppInputStream.read(Unknown Source)
at com.sun.mail.util.TraceInputStream.read(TraceInputStream.java:97)
at java.io.BufferedInputStream.fill(Unknown Source)
at java.io.BufferedInputStream.read(Unknown Source)
at com.sun.mail.util.LineInputStream.readLine(LineInputStream.java:75)
at com.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java:1440)
... 10 more
Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at sun.security.validator.PKIXValidator.doBuild(Unknown Source)
at sun.security.validator.PKIXValidator.engineValidate(Unknown Source)
at sun.security.validator.Validator.validate(Unknown Source)
at sun.security.ssl.X509TrustManagerImpl.validate(Unknown Source)
at sun.security.ssl.X509TrustManagerImpl.checkTrusted(Unknown Source)
at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source)
... 23 more
Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(Unknown Source)
at java.security.cert.CertPathBuilder.build(Unknown Source)
------------------------------------------------------------------------------------------------------------------------
Please let me know how can i avoid this error in the secure LAN.

Thanks in advance...
Regards,
Chandan kumar Sah
Moderator

Re: Send Mail to Multiple Address

Hi,
The issue is probably caused by your secure LAN. As I said in previous posts, you should add the server's certificate to the KeyStore with your trusted certificates.
PKIX path building failed: SunCertPathBuilderException: unable to find valid certification path to r....
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: Send Mail to Multiple Address

Dear Xdshi,
I have a job requirement in which i have to take email ids from the excel sheet and send the email notification to that email ids.
excel sheet is containing list of email ids.
Regards,
Csah
Four Stars

Re: Send Mail to Multiple Address

Hi Csah,
You can do that, can you pl open a new thread for this request?
Vaibahv
Moderator

Re: Send Mail to Multiple Address

Hi csah,
You can use Context value in your job requirement. Your topic is not related to current one. Would you mind opening a new topic for your design requirement so that we can pay individual attention on your issue.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.