Spring boot 阿鲁巴邮件
我想用Aruba主机和Spring boot 阿鲁巴邮件,spring-boot,email,smtp,Spring Boot,Email,Smtp,我想用Aruba主机和SpringBoot 2.1.3应用程序发送邮件。在开始之前,我做了一个小测试,相信我不会发现任何问题。。我错了 这是我的应用程序。属性 spring.mail.host=smtps.aruba.it spring.mail.port=465 spring.mail.username=*** spring.mail.password=*** spring.mail.properties.mail.smtp.auth=true spring.mail.properties.m
SpringBoot 2.1.3
应用程序发送邮件。在开始之前,我做了一个小测试,相信我不会发现任何问题。。我错了
这是我的应用程序。属性
spring.mail.host=smtps.aruba.it
spring.mail.port=465
spring.mail.username=***
spring.mail.password=***
spring.mail.properties.mail.smtp.auth=true
spring.mail.properties.mail.smtp.starttls.enable=true
spring.mail.properties.mail.smtp.starttls.required=true
spring.mail.properties.mail.debug=true
不工作,调试说它无法连接到主机。。当调试器尝试执行此操作时,它会编写:
DEBUG SMTP: useEhlo true, useAuth true
DEBUG SMTP: trying to connect to host "smtps.aruba.it", port 465, isSSL false
怎么了??我试着用相同参数的gmail和hotmail发送邮件,一切都很好。。该死的阿鲁巴
谢谢我不是100%确定,但尝试使用不带“s”的smtp作为主机,因为您没有使用安全的SSL连接:
smtp.aruba.it
更多信息:解决方案:
spring.mail.host=smtps.aruba.it
spring.mail.port=465
spring.mail.username=***
spring.mail.password=***
spring.mail.protocol=smtp
spring.mail.properties.mail.smtp.auth=true
spring.mail.properties.mail.smtp.socketFactory.port=465
spring.mail.properties.mail.smtp.socketFactory.class=javax.net.ssl.SSLSocketFactory
spring.mail.properties.mail.smtp.socketFactory.fallback=false
希望对您有所帮助。如果您想使用STARTTLS交换机连接端口587,端口465用于隐式SSL而不是显式SSL
spring.mail.host=smtps.aruba.it
spring.mail.port=587
spring.mail.username=***
spring.mail.password=***
spring.mail.properties.mail.smtp.auth=true
spring.mail.properties.mail.smtp.starttls.enable=true
不,我必须用它!我尝试将该帐户添加到Thunderbird,这是默认选择,并且一切正常。相反,我认为问题在于安全性,因为Hotmail和Gmail是STARTTLS,Aruba是SSL/TLS,我还没有找到用SpringBoot设置它的方法。谢谢,无论如何,我会尝试创建一个帐户,并尝试与你解决它,如果我有任何消息,我会让你知道这里。