estou usando o vraptor simple mail 4.1.0-RCA com vraptor 4.2.0-RC5 , mas no momento de enviar me da o seguinte erro :
javax.mail.MessagingException: Could not convert socket to TLS;
nested exception is:
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
meu prodution.properties:
vraptor.simplemail.main.port = 587
vraptor.simplemail.main.tls = true
vraptor.simplemail.main.auth = true
vraptor.simplemail.main.password=Gama2017
metodo do controler:
public void enviaPedido() {
Email email = new SimpleEmail();
email.setSubject("teste de email");
try {
email.setMsg("teste de mensagem");
mailer.send(email);
System.out.println("ENVIADO COM SUCESSO!!");
} catch (EmailException e) {
// TODO Auto-generated catch block
System.out.println("Nao foi possivel enviar o email!!"+e.getCause());
}
result.redirectTo(this).compras();
}