简体   繁体   中英

Email sent with spring mail via ovh address is not received

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM