Email sent with spring mail via ovh address is not received

584 views Asked by At

I have a problem when I try to send an email via an ovh mail account with spring. The email seems to be sent, no error is retrieved, but the recipient does not receive the mail. Important : it works when I send the mail with a gmail account ! This is the spring mail parameters I use (so it works with gmail, not with ovh) :

spring:
  mail:
    host: ssl0.ovh.net 
    port: 587
    username: <ovh address>
    password: <password>
    properties:
      mail:
        smtp:
          auth: true
          starttls:
            enable: true

Can anyone help me please ? Thanks in advance.

1

There are 1 answers

0
Oskarro On

Try with my configuration below:

######  EMAIL PROPERTIES  ######
spring.mail.host=ssl0.ovh.net
spring.mail.port=587
spring.mail.username=your_username@your_domain.com
spring.mail.password=your_password
spring.mail.test-connection=true
spring.mail.properties.mail.smtp.auth=true
spring.mail.properties.mail.smtp.starttls.enable=true
spring.mail.properties.mail.smtp.starttls.required=true