4

Is it possible to user javax mail with OVH? I can do it with Yahoo mail, but when I am trying to use it with OVH I am getting this error :

at org.springframeworkjavax.mail.MessagingException: Exception reading response; nested exception is: java.net.SocketException: Connection reset

the connection properties are :

properties.put("mail.smtp.starttls.enable", "true");
properties.put("mail.smtp.host", host);
properties.put("mail.smtp.user", from);
properties.put("mail.smtp.password", pass);
properties.put("mail.smtp.port", "465");
properties.put("mail.smtp.auth", "true");
properties.put("mail.imap.ssl.enable", "true");

If anyone can see where I am wrong here...

Thanks.

user1260928
  • 3,269
  • 9
  • 59
  • 105
  • 2
    The port for TLS should be 587, I have checked the site of OVH which refer this port number http://help.ovh.com/EmailConfiguration – Mohammad Ashfaq Jun 16 '15 at 11:26

2 Answers2

1

I tried successfully by using the TLD port 587 (as indicated by @Mo.Ashfaq above).

The documentation from OVH is visible here: http://help.ovh.com/EmailConfiguration

brclz
  • 806
  • 9
  • 23
0

This config works for me:

properties.put("mail.smtp.host", "ssl0.ovh.net");
properties.put("mail.smtp.user", user);
properties.put("mail.smtp.password", pass);
properties.put("mail.smtp.port", "587");
properties.put("mail.smtp.auth", "true");
properties.put("mail.smtp.starttls.enable", "true");
Andrés Cuadros
  • 1,962
  • 1
  • 21
  • 22