after my web-server provider disabled old security protocol(versions) and cipher suites, I am no longer able to connect to the smtpserver. this was my original configuration, but no encrypted communication (SSL, TLS) is longer possible.
What could be the source of this problem?
DEBUG: setDebug: JavaMail version 1.5.5 (JDK 1.7)
when I try the same without SSL (commented in code), it works fine, so there has to be a problem with the webserver. Funny fact: Outlook works just fine (with same credentials)!
public static void main(final String[] args) throws Exception {
System.setProperty("javax.net.debug", "all");
final Properties props = new Properties();
// use SSL (worked before ssl-update on mailserver, where old security protocols were disabled)
props.put("mail.smtp.ssl.socketFactory", "javax.net.ssl.SSLSocketFactory");
props.put("mail.smtp.socketFactory.port", "465");
props.put("mail.smtp.socketFactory.fallback", "false");
props.put("mail.smtp.host", "alfa3022.alfahosting-server.de");
props.put("mail.smtp.port", "465");
props.put("mail.smtp.ssl.enable", "true");
// no ssl (works fine!):
// props.put("mail.debug", "true");
// props.put("mail.smtp.host", SMTP_HOST_NAME);
// props.put("mail.smtp.auth", "true");
// props.put("mail.smtp.port", 587);
final Session session = Session.getInstance(props, new javax.mail.Authenticator() {
@Override
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(getEmailUsername(), getEmailPassword());
}
});
session.setDebug(true);
final Message msg = new MimeMessage(session);
final InternetAddress addressFrom = new InternetAddress("test@test.com");
msg.setFrom(addressFrom);
// [...] create email object and add contents to msg
msg.setRecipient(Message.RecipientType.BCC, new InternetAddress("dummy@test.com"));
Transport.send(msg);
}
When I execute a Handshake-Simulation of the email-server it tells me that java is not working?? https://www.ssllabs.com/ssltest/analyze.html?d=alfa3022.alfahosting-server.de
What could be the difference or what am I failed to see?