<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: [resolved] MessagingException caused by SSLException in tSendMail in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/resolved-MessagingException-caused-by-SSLException-in-tSendMail/m-p/2354365#M120350</link>
    <description>Hi 
&lt;BR /&gt;Try to check the option STARTTLS and test again. 
&lt;BR /&gt;Best regards 
&lt;BR /&gt;Shong</description>
    <pubDate>Thu, 22 Sep 2011 05:34:19 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2011-09-22T05:34:19Z</dc:date>
    <item>
      <title>[resolved] MessagingException caused by SSLException in tSendMail</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-MessagingException-caused-by-SSLException-in-tSendMail/m-p/2354364#M120349</link>
      <description>Hello, I'm facing following weird error. 
&lt;BR /&gt;Platform: Talend Open Studio 4.2.3 
&lt;BR /&gt;I create a simple job with a tSendMail component with minimal settings, no SSL, no STARTTLS. 
&lt;BR /&gt;I export it as an autonomous job and run it on Ubuntu server. It works. 
&lt;BR /&gt;Then I export it as a web service (WAR) and deploy it on the same Ubuntu server on Tomcat 6. In this case I get: 
&lt;BR /&gt; 
&lt;PRE&gt;Exception in component tSendMail_1&lt;BR /&gt;javax.mail.MessagingException: Could not connect to SMTP host: xxx.xxx.xxx.xxx, port: 25;&lt;BR /&gt;  nested exception is:&lt;BR /&gt;	javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?&lt;BR /&gt;	at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1934)&lt;BR /&gt;	at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:638)&lt;BR /&gt;	at javax.mail.Service.connect(Service.java:295)&lt;BR /&gt;	at javax.mail.Service.connect(Service.java:176)&lt;BR /&gt;	at javax.mail.Service.connect(Service.java:125)&lt;BR /&gt;	at javax.mail.Transport.send0(Transport.java:194)&lt;BR /&gt;	at javax.mail.Transport.send(Transport.java:124)&lt;BR /&gt;	at opvdominocad.testsendmail_0_1.TestSendMail.tSendMail_1Process(TestSendMail.java:364)&lt;BR /&gt;	at opvdominocad.testsendmail_0_1.TestSendMail.runJobInTOS(TestSendMail.java:549)&lt;BR /&gt;	at opvdominocad.testsendmail_0_1.TestSendMail.runJob(TestSendMail.java:448)&lt;BR /&gt;	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)&lt;BR /&gt;	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)&lt;BR /&gt;	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)&lt;BR /&gt;	at java.lang.reflect.Method.invoke(Method.java:597)&lt;BR /&gt;	at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:397)&lt;BR /&gt;	at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:186)&lt;BR /&gt;	at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323)&lt;BR /&gt;	at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)&lt;BR /&gt;	at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)&lt;BR /&gt;	at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)&lt;BR /&gt;	at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:454)&lt;BR /&gt;	at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)&lt;BR /&gt;	at org.apache.axis.transport.http.QSMethodHandler.invokeEndpointFromGet(QSMethodHandler.java:129)&lt;BR /&gt;	at org.apache.axis.transport.http.QSMethodHandler.invoke(QSMethodHandler.java:94)&lt;BR /&gt;	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)&lt;BR /&gt;	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)&lt;BR /&gt;	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)&lt;BR /&gt;	at java.lang.reflect.Method.invoke(Method.java:597)&lt;BR /&gt;	at org.apache.axis.transport.http.AxisServlet.processQuery(AxisServlet.java:1226)&lt;BR /&gt;	at org.apache.axis.transport.http.AxisServlet.doGet(AxisServlet.java:249)&lt;BR /&gt;	at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)&lt;BR /&gt;	at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)&lt;BR /&gt;	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)&lt;BR /&gt;	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)&lt;BR /&gt;	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)&lt;BR /&gt;	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)&lt;BR /&gt;	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)&lt;BR /&gt;	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)&lt;BR /&gt;	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)&lt;BR /&gt;	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)&lt;BR /&gt;	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)&lt;BR /&gt;	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)&lt;BR /&gt;	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)&lt;BR /&gt;	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)&lt;BR /&gt;	at java.lang.Thread.run(Thread.java:619)&lt;BR /&gt;Caused by: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?&lt;BR /&gt;	at com.sun.net.ssl.internal.ssl.InputRecord.handleUnknownRecord(InputRecord.java:523)&lt;BR /&gt;	at com.sun.net.ssl.internal.ssl.InputRecord.read(InputRecord.java:355)&lt;BR /&gt;	at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:789)&lt;BR /&gt;	at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1096)&lt;BR /&gt;	at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1123)&lt;BR /&gt;	at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1107)&lt;BR /&gt;	at com.sun.mail.util.SocketFetcher.configureSSLSocket(SocketFetcher.java:507)&lt;BR /&gt;	at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:238)&lt;BR /&gt;	at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1900)&lt;BR /&gt;	... 44 more&lt;/PRE&gt; 
&lt;BR /&gt;Maybe is something connected with Tomcat or with the web services? Note that if I run the same job on Tomcat on another machine (but also with a different SMTP host) it works... 
&lt;BR /&gt;I'm going mad. Any help will be greatly appreciated!</description>
      <pubDate>Sat, 16 Nov 2024 12:40:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-MessagingException-caused-by-SSLException-in-tSendMail/m-p/2354364#M120349</guid>
      <dc:creator>bluishjoe</dc:creator>
      <dc:date>2024-11-16T12:40:19Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] MessagingException caused by SSLException in tSendMail</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-MessagingException-caused-by-SSLException-in-tSendMail/m-p/2354365#M120350</link>
      <description>Hi 
&lt;BR /&gt;Try to check the option STARTTLS and test again. 
&lt;BR /&gt;Best regards 
&lt;BR /&gt;Shong</description>
      <pubDate>Thu, 22 Sep 2011 05:34:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-MessagingException-caused-by-SSLException-in-tSendMail/m-p/2354365#M120350</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-09-22T05:34:19Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] MessagingException caused by SSLException in tSendMail</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-MessagingException-caused-by-SSLException-in-tSendMail/m-p/2354366#M120351</link>
      <description>Thanks for the reply. 
&lt;BR /&gt;I checked and unchecked the option STARTTLS, but no difference in the result. 
&lt;BR /&gt;Finally 
&lt;B&gt;I solved the problem with a tJava&lt;/B&gt;, which sends the email. 
&lt;BR /&gt;Its imports (needs 2 tLibraryLoad for mail.jar and activation.jar): 
&lt;BR /&gt; 
&lt;PRE&gt;import java.io.*;&lt;BR /&gt;import java.util.*;&lt;BR /&gt;import javax.mail.*;&lt;BR /&gt;import javax.mail.internet.*;&lt;BR /&gt;import javax.activation.*;&lt;/PRE&gt; 
&lt;BR /&gt;Its code: 
&lt;BR /&gt; 
&lt;PRE&gt;//build and send the email&lt;BR /&gt;Properties props = new Properties();&lt;BR /&gt;props.put("mail.smtp.host", context.SMTP_HOST);&lt;BR /&gt;Session mail_session = Session.getDefaultInstance(props, null);&lt;BR /&gt;Message msg = new MimeMessage(mail_session);&lt;BR /&gt;msg.setFrom(new InternetAddress(context.MAIL_FROM));&lt;BR /&gt;Vector&amp;lt;String&amp;gt; recipients = new Vector&amp;lt;String&amp;gt;();&lt;BR /&gt;recipients.addElement((String)globalMap.get("mailcom"));&lt;BR /&gt;recipients.addElement((String)globalMap.get("mailcli"));&lt;BR /&gt;InternetAddress[] addressTo = new InternetAddress;&lt;BR /&gt;for (int i = 0; i &amp;lt; recipients.size(); i++)&lt;BR /&gt;	addressTo&lt;I&gt; = new InternetAddress((String)recipients.elementAt(i));&lt;BR /&gt;msg.setRecipients(Message.RecipientType.TO, addressTo);&lt;BR /&gt;msg.setSubject(context.MAIL_SUBJECT);&lt;BR /&gt;msg.setSentDate(new Date());&lt;BR /&gt;Multipart mp = new MimeMultipart();&lt;BR /&gt;MimeBodyPart mbp = new MimeBodyPart();&lt;BR /&gt;mbp.setContent(context.MAIL_TEXT, "text/html");	    &lt;BR /&gt;mp.addBodyPart(mbp);&lt;BR /&gt;//add attachments&lt;BR /&gt;File attachments_folder = new File(context.ATTACHMENTS_SOURCE_FOLDER);&lt;BR /&gt;if (attachments_folder!=null){	//attachments folder exist&lt;BR /&gt;	File[] files = attachments_folder.listFiles();&lt;BR /&gt;	if (files!=null){&lt;BR /&gt;		for(File file : files){&lt;BR /&gt;			if (file.isFile()){&lt;BR /&gt;				mbp = new MimeBodyPart();&lt;BR /&gt;				DataSource source = new FileDataSource(file);&lt;BR /&gt;				mbp.setDataHandler(new DataHandler(source));&lt;BR /&gt;				mbp.setFileName(file.getName());&lt;BR /&gt;				mp.addBodyPart(mbp);   //add bodypart to the multipart&lt;BR /&gt;			}&lt;BR /&gt;		}&lt;BR /&gt;	}&lt;BR /&gt;}&lt;BR /&gt;msg.setContent(mp);&lt;BR /&gt;Transport.send(msg);&lt;/I&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 22 Sep 2011 07:47:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-MessagingException-caused-by-SSLException-in-tSendMail/m-p/2354366#M120351</guid>
      <dc:creator>bluishjoe</dc:creator>
      <dc:date>2011-09-22T07:47:20Z</dc:date>
    </item>
  </channel>
</rss>

