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;