Hi, I am running Java Mail smtp configuration for my client with java mail api. it showing javax.mail.SendFailedException : Sending Failed; nested Exception is: class javax.mail.MessagingException : Exception reading response; nested Exception is: 'javax.net.ssl.sslexception unrecognized ssl message, plaintext connection ?' my main code is : //getting input from here for host,from,password,port and to address props.put('mail.smtp.host', host); props.put('mail.smtp.user', from); props.put('mail.smtp.password', pword); props.put('mail.smtp.port', port); props.put('mail.smtp.ssl.enable', 'true'); props.put('mail.smtp.auth', 'true'); Session session = null; props.put('mail.smtp.socketFactory.port', port); props.put('mail.smtp.socketFactory.class', 'javax.net.ssl.SSLSocketFactory'); props.put('mail.smtp.socketFactory.fallback', 'false'); if(from != null && pword != null) { props.put('mail.smtp.auth', 'true'); session = Session.getInstance(props, new MyPasswordAuthenticator(from, pword)); } else { session = Session.getDefaultInstance(props, null); } MimeMessage message = new MimeMessage(session); message.setFrom(new InternetAddress(from)); InternetAddress toAddress[] = new InternetAddress[to.length]; for(int i = 0; i < to.length; i++) { toAddress[i] = new InternetAddress(to[i]); } message.setRecipients(javax.mail.Message.RecipientType.TO, toAddress); message.setSubject(subject); BodyPart bp1 = new MimeBodyPart(); Multipart multipart = new MimeMultipart(); bp1.setText(messageBody); multipart.addBodyPart(bp1); bp1 = new MimeBodyPart(); javax.activation.DataSource source = new FileDataSource(ff); bp1.setDataHandler(new DataHandler(source)); bp1.setFileName(fileName); multipart.addBodyPart(bp1); message.setContent(multipart); Transport.send(message); System.out.println((new StringBuilder('Sucessfully Sent to ')).append(toAddress).append('n').toString()); How to resove it ? it works in gmail smtp with this same code. but when i use client details(smtp address and port number) it showing above exception. is there tool or program to check SSL ? Thanks in advance
Status:Closed
Resolution: Duplicate
Fix Version/s:4.1.0 GA (Platform Release 3.7.0)
Labels:
How To Fix: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection in Confluence JNDI. I’ve been doing Exchange to Office 365 migrations lately and that means on-premises applications and devices can’t use the local Exchange server to send mail anymore.
Javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection? You should have a local SMTP domain name that will contact the mail server and establishes a new connection as well you should change the SSL property in your programming below. Javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection props.put('mail.
Notice:
When an issue is open, the 'Fix Version/s' field conveys a target, not necessarily a commitment. When an issue is closed, the 'Fix Version/s' field conveys the version that the issue was fixed in.
Operating System/s:
The issue seems to be only in the transform mail step and not in the job mail step where I have successfully used smtp auth without using SSL.
If you check the 'Use Authentication' checkbox in the Server tab of the step dialog, leave the 'Use secure authentication' box unchecked, and provide an smtp host, auth user and password, the step attempts to connect to the smtp server on SSL port 465 rather than standard port 25.
Providing a value of 25 in a field for the port field in the dialog does not result in a plain connection on port 25, but rather an attempted SSL connection on unknown port, which fails.
2010/03/30 13:54:27 - org.pentaho.di.ui.spoon.trans.TransGraph - Transformation opened. 2010/03/30 13:54:27 - Spoon - Launching transformation [test_transform_email]... 2010/03/30 13:54:27 - Spoon - Started the transformation execution. 2010/03/30 13:54:27 - test_transform_email - Dispatching started for transformation [test_transform_email] 2010/03/30 13:54:27 - test_transform_email - Natural sort of steps executed in 0ms (2 time previous steps calculated) 2010/03/30 13:54:27 - test_transform_email - This transformation can be replayed with replay date: 2010/03/30 13:54:27 2010/03/30 13:54:27 - Generate Rows.0 - Finished processing (I=0, O=0, R=0, W=1, U=0, E=0) 2010/03/30 13:54:28 - Mail.0 - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : Unexpected error : 2010/03/30 13:54:28 - Mail.0 - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : org.pentaho.di.core.exception.KettleException: 2010/03/30 13:54:28 - Mail.0 - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : Can not send mail! 2010/03/30 13:54:28 - Mail.0 - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : Exception reading response 2010/03/30 13:54:28 - Mail.0 - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : 2010/03/30 13:54:28 - Mail.0 - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : at org.pentaho.di.trans.steps.mail.Mail.processRow(Mail.java:363) 2010/03/30 13:54:28 - Mail.0 - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : at org.pentaho.di.trans.step.BaseStep.runStepThread(BaseStep.java:2889) 2010/03/30 13:54:28 - Mail.0 - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : at org.pentaho.di.trans.steps.mail.Mail.run(Mail.java:791) 2010/03/30 13:54:28 - Mail.0 - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : Caused by: javax.mail.MessagingException: Exception reading response; nested exception is: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection? 2010/03/30 13:54:28 - Mail.0 - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : at com.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java:1462) 2010/03/30 13:54:28 - Mail.0 - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1260) 2010/03/30 13:54:28 - Mail.0 - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:370) 2010/03/30 13:54:28 - Mail.0 - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : at javax.mail.Service.connect(Service.java:275) 2010/03/30 13:54:28 - Mail.0 - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : at org.pentaho.di.trans.steps.mail.Mail.sendMail(Mail.java:529) 2010/03/30 13:54:28 - Mail.0 - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : at org.pentaho.di.trans.steps.mail.Mail.processRow(Mail.java:348) 2010/03/30 13:54:28 - Mail.0 - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : ... 2 more 2010/03/30 13:54:28 - Mail.0 - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : Caused by: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection? 2010/03/30 13:54:28 - Mail.0 - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : at com.sun.net.ssl.internal.ssl.InputRecord.handleUnknownRecord(Unknown Source) 2010/03/30 13:54:28 - Mail.0 - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : at com.sun.net.ssl.internal.ssl.InputRecord.read(Unknown Source) 2010/03/30 13:54:28 - Mail.0 - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source) 2010/03/30 13:54:28 - Mail.0 - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source) 2010/03/30 13:54:28 - Mail.0 - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readDataRecord(Unknown Source) 2010/03/30 13:54:28 - Mail.0 - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : at com.sun.net.ssl.internal.ssl.AppInputStream.read(Unknown Source) 2010/03/30 13:54:28 - Mail.0 - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : at com.sun.mail.util.TraceInputStream.read(TraceInputStream.java:97) 2010/03/30 13:54:28 - Mail.0 - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : at java.io.BufferedInputStream.fill(Unknown Source) 2010/03/30 13:54:28 - Mail.0 - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : at java.io.BufferedInputStream.read(Unknown Source) 2010/03/30 13:54:28 - Mail.0 - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : at com.sun.mail.util.LineInputStream.readLine(LineInputStream.java:75) 2010/03/30 13:54:28 - Mail.0 - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : at com.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java:1440) 2010/03/30 13:54:28 - Mail.0 - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : ... 7 more 2010/03/30 13:54:28 - Mail.0 - Finished processing (I=0, O=0, R=1, W=0, U=0, E=1) 2010/03/30 13:54:28 - Spoon - The transformation has finished!! 2010/03/30 13:54:28 - test_transform_email - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : Errors detected! 2010/03/30 13:54:28 - test_transform_email - Transformation detected one or more steps with errors. 2010/03/30 13:54:28 - test_transform_email - Transformation is killing the other steps!
Ssl Connection Error Iphone
Will try to attach the transform source I don't see a widget here yet
Unrecognized Ssl Message Plaintext Connection Smtp Yahoo Mail