After multiple researches I can't succeed to send any mail with java
Properties props = new Properties();
props.put("mail.smtp.starttls.enable", "true");
props.put("mail.smtp.starttls.required", "true");
props.put("mail.transport.protocol","smtp");
props.put("mail.smtp.host", "smtp.live.com");
props.put("mail.smtp.port", "587");
Session session = Session.getDefaultInstance(props, null);
Message msg = new MimeMessage(session);
msg.setFrom(new InternetAddress("matr@live.fr"));
InternetAddress toAddress = new InternetAddress("matrphone@gmail.com");
msg.addRecipient(Message.RecipientType.TO, toAddress);
msg.setSubject("sujet du mail de text");
msg.setText("aaa");
Transport transport = session.getTransport("smtps");
transport.connect("smtp.gmail.com", 587,"matr@live.fr", "mypasswordcached");
transport.send(msg);
I have Exception in thread "main" javax.mail.NoSuchProviderException: No provider for smtps I don't understand why Anyone can help me please ?