Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Unrecognized SSL message, plaintext connection?

800790Aug 20 2006 — edited Jan 21 2010
hi,

Im struggling a lot with this... When Im trying to send an email I get the message

DEBUG SMTP: exception reading response: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?

I dont know what the problem could be...

If you can, then thanks you are fricken amazing! ANyway, i continue

here is a piece of my code...

public boolean send() throws MessagingException{
		
		try{
			Properties props = new Properties();
			props.put("mail.smtp.host", fiStrHost);
			props.put("mail.smtp.socketFactory.class", "javax.net.ssl.SSLSocketFactory"); 
			props.put("mail.smtp.socketFactory.fallback", "false");
			props.put("mail.smtps.auth", "true");
			props.put("mail.smtp.port", "80");
			props.put("mail.smtp.socketFactory.port", "80"); 
			
	        Session mailSession = Session.getDefaultInstance(props, 
	        		new javax.mail.Authenticator() { 
	        			protected PasswordAuthentication getPasswordAuthentication() { 
	        				return new PasswordAuthentication(fiStrFrom, fiStrPassword); 
	        			} 
	        		}); 
	        mailSession.setDebug(true);
	
	        MimeMessage mmMessage = new MimeMessage(mailSession);
	        mmMessage.setContent(m_txaText.getText(), "text/plain");
	        mmMessage.setRecipient(Message.RecipientType.TO, new InternetAddress(fiStrTo));
	        mmMessage.setSubject("Credits");
	        mmMessage.setFrom(new InternetAddress(fiStrFrom));
	 
	        Transport tr = mailSession.getTransport("smtps");
	        System.out.println("4");
	        tr.connect(fiStrHost, 80, fiStrFrom, fiStrPassword);
//BREAKS ON THE TR.CONNECT LINE
	        mmMessage.saveChanges();
DEBUG: setDebug: JavaMail version 1.4ea
DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]
DEBUG SMTP: useEhlo true, useAuth false
DEBUG SMTP: trying to connect to host "smtpout.secureserver.net", port 80, isSSL false
DEBUG SMTP: exception reading response: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
javax.mail.MessagingException: Exception reading response;
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 18 2010
Added on Aug 20 2006
3 comments
5,460 views