SSL [SOLVED]: Spring mail disable TLS

SSL [SOLVED]: Spring mail disable TLS

Home Forums SSL SSL [SOLVED]: Spring mail disable TLS

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #36762

    Anonymous

    QuestionQuestion

    I’m trying to use localhost as the mail server but getting “454 4.7.0 TLS not available due to local problem” error.

    How can I disable TLS for mail?

    I’m using Spring Boot.

    #36763

    Anonymous

    Accepted AnswerAnswer

    mail.smtp.starttls.enable and mail.smtp.starttls.required are two properties defined in JavaMail. However, in order to use them in a Spring application, we need to add them to application properties using the “additional properties” method in Spring. Relevant excerpt from Spring Boot reference:

    spring.mail.properties.*= # Additional JavaMail session properties.
    

    Hence, in short, we need to add the following to our application.properties file to use mail without TLS in Spring:

    spring.mail.properties.mail.smtp.starttls.enable=false
    spring.mail.properties.mail.smtp.starttls.required=false
    

    Source

    Source: https://stackoverflow.com/questions/47879205/spring-mail-disable-tls
    Author: Utku
    Creative Commons License
    This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.