Spring 邮件禁用 TLS
Spring mail disable TLS
我正在尝试使用本地主机作为邮件服务器,但出现“454 4.7.0 TLS 由于本地问题不可用”错误。
如何为邮件禁用 TLS?
我正在使用 Spring 启动。
mail.smtp.starttls.enable
和 mail.smtp.starttls.required
是 JavaMail 中定义的两个属性。但是,为了在 Spring 应用程序中使用它们,我们需要使用 Spring 中的 "additional properties" 方法将它们添加到应用程序属性中。相关摘录自Spring Boot reference:
spring.mail.properties.*= # Additional JavaMail session properties.
因此,简而言之,我们需要将以下内容添加到 application.properties
文件中,以便在 Spring 中使用不带 TLS 的邮件:
spring.mail.properties.mail.smtp.starttls.enable=false
spring.mail.properties.mail.smtp.starttls.required=false
我正在尝试使用本地主机作为邮件服务器,但出现“454 4.7.0 TLS 由于本地问题不可用”错误。
如何为邮件禁用 TLS?
我正在使用 Spring 启动。
mail.smtp.starttls.enable
和 mail.smtp.starttls.required
是 JavaMail 中定义的两个属性。但是,为了在 Spring 应用程序中使用它们,我们需要使用 Spring 中的 "additional properties" 方法将它们添加到应用程序属性中。相关摘录自Spring Boot reference:
spring.mail.properties.*= # Additional JavaMail session properties.
因此,简而言之,我们需要将以下内容添加到 application.properties
文件中,以便在 Spring 中使用不带 TLS 的邮件:
spring.mail.properties.mail.smtp.starttls.enable=false
spring.mail.properties.mail.smtp.starttls.required=false