我在develop中对我的公司的邮件帐户进行了以下配置,运行良好:
mail:
host: smtp.xxx.es
port: 587
username: notifications-noreply@xxx.es
password: xxxx
protocol: smtp
#tls: true
properties.mail.smtp:
auth: true
from: notifications-noreply@xxx.es
starttls.enable: true
ssl.trust: smtp.xxx.es
我将相同的数据从“application-dev.yml”复制到“application-prod.yml”。
我在谷歌云中进行部署。
它不会向我发送邮件,日志告诉我以下内容:
: Email could not be sent to user 'joseluis.xxx@xxx.com': Mail server connection failed; nested exception is com.sun.mail.util.MailConnectException: Couldn't connect to host, port: smtp.xxx.es, 587; timeout -1;
nested exception is:
java.net.ConnectException: Operation timed out (Connection timed out). Failed messages: com.sun.mail.util.MailConnectException: Couldn't connect to host, port: smtp.xxx.es, 587; timeout -1;
nested exception is:
java.net.ConnectException: Operation timed out (Connection timed out)
有人能帮我吗?