tSendMail tutorial

One Star

tSendMail tutorial

Hi,
I need to set up tSendMail on success and failure of a particular task. I couldn't find any tutorial on this . Can anyone please explain to me or provide me the link for tSendMail setup?
Many Thanks,
Manju
Employee

Re: tSendMail tutorial

Hi Manju,
You can just select the tSendMail component in your job, and then press F1. You will have a description of the component properties, as well as a scenario of the component's usage.
One Star

Re: tSendMail tutorial

Hi,
1- I posted 3 screenshots about sending e-mail in case of failure of a job...
2- What you should do for sending an e-mail on success of a job is that put another tsendmail after your last component and connect it on component ok, so when your last component works successfully, it sends success e-mail.
I hope I could be helpful to you...
One Star

Re: tSendMail tutorial

Thanks cinar. It was really helpful!!!
One Star

Re: tSendMail tutorial

can any one help me i couldn't make tsendmail work
Démarrage du job testmailling a 12:36 21/04/2013.
connecting to socket on port 3898
connected
Exception in component tSendMail_1
javax.mail.MessagingException: Unknown SMTP host: smtp.gmail.com;
nested exception is:
java.net.UnknownHostException: smtp.gmail.com
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1932)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:638)
at javax.mail.Service.connect(Service.java:317)
at javax.mail.Service.connect(Service.java:176)
at javax.mail.Service.connect(Service.java:125)
at javax.mail.Transport.send0(Transport.java:194)
at javax.mail.Transport.send(Transport.java:124)
at test.testmailling_0_1.testmailling.tSendMail_1Process(testmailling.java:410)
at test.testmailling_0_1.testmailling.runJobInTOS(testmailling.java:620)
at test.testmailling_0_1.testmailling.main(testmailling.java:488)
Caused by: java.net.UnknownHostException: smtp.gmail.com
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(Unknown Source)
at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.connect(Unknown Source)
at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:288)
at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:205)
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1900)
... 9 more
disconnected
Job testmailling terminé à 12:36 21/04/2013.
Community Manager

Re: tSendMail tutorial

Hi Ninio
Can you test to ping to smtp:gmail.com in a command prompt and see if you are able to connect to smtp:gmail.com? For example:
DSmiley Embarassedping smtp:gmail.com
Are you under proxy in your network?

Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
Moderator

Re: tSendMail tutorial

Hi ninio,
I have given you a response on Forum 12509, hope it will be useful.
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: tSendMail tutorial

hi
yes we are using proxy
and i still have the same problem
Démarrage du job sendmail a 14:34 30/04/2013.
connecting to socket on port 3666
connected
Exception in component tSendMail_1
javax.mail.MessagingException: Could not connect to SMTP host: smtp.gmail.com, port: 465;
nested exception is:
java.net.ConnectException: Connection timed out: connect
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1934)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:638)
at javax.mail.Service.connect(Service.java:317)
at javax.mail.Service.connect(Service.java:176)
at javax.mail.Service.connect(Service.java:125)
at javax.mail.Transport.send0(Transport.java:194)
at javax.mail.Transport.send(Transport.java:124)
at test.sendmail_0_1.sendmail.tSendMail_1Process(sendmail.java:410)
at test.sendmail_0_1.sendmail.runJobInTOS(sendmail.java:620)
at test.sendmail_0_1.sendmail.main(sendmail.java:488)
Caused by: java.net.ConnectException: Connection timed out: connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
disconnected
at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.security.ssl.SSLSocketImpl.connect(Unknown Source)
at sun.security.ssl.BaseSSLSocketImpl.connect(Unknown Source)
at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:288)
at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:205)
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1900)
... 9 more
Job sendmail terminé à 14:34 30/04/2013.
Seventeen Stars

Re: tSendMail tutorial

If there is a proxy in this case you have to tell that proxy to the Java run time. Please use the tSetProxy component at the start of your job.
One Star

Re: tSendMail tutorial

Hi Manju,
Its so easy to send mail based on job success and failure. Pls go through the screenshot below
Fore more talend tutorials visit http://talendtutorials.com

Thanks
//Dhiraj