小猫不吃鱼
国外的VPS一般连接谷歌应该没啥问题
可以查看下日志:
最新的个人中心里,进行邮箱验证(总之找一个可以触发右键发送的操作)
然后下载日志,查看下日志。
比如我这周刚解决的,就是下载了日志,发现了以下内容:
run.halo.app.notification.DefaultNotificationSender.reconcile(DefaultNotificationSender.java:87) ~[classes/:2.11.2]
at run.halo.app.notification.DefaultNotificationSender.reconcile(DefaultNotificationSender.java:30) ~[classes/:2.11.2]
at run.halo.app.extension.controller.DefaultController$Worker.run(DefaultController.java:163) ~[api-2.11.2.jar:na]
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) ~[na:na]
at java.base/java.util.concurrent.FutureTask.run(Unknown Source) ~[na:na]
... 3 common frames omitted
Caused by: jakarta.mail.MessagingException: Could not connect to SMTP host: smtp.126.com, port: 25
at org.eclipse.angus.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:2245) ~[jakarta.mail-2.0.2.jar:na]
at org.eclipse.angus.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:729) ~[jakarta.mail-2.0.2.jar:na]
at jakarta.mail.Service.connect(Service.java:345) ~[jakarta.mail-2.0.2.jar:na]
at org.springframework.mail.javamail.JavaMailSenderImpl.connectTransport(JavaMailSenderImpl.java:480) ~[spring-context-support-6.1.1.jar:6.1.1]
at org.springframework.mail.javamail.JavaMailSenderImpl.doSend(JavaMailSenderImpl.java:399) ~[spring-context-support-6.1.1.jar:6.1.1]
... 12 common frames omitted
Caused by: javax.net.ssl.SSLException: Unsupported or unrecognized SSL message
at java.base/sun.security.ssl.SSLSocketInputRecord.handleUnknownRecord(Unknown Source) ~[na:na]
其中
jakarta.mail.MessagingException: Could not connect to SMTP host: smtp.126.com, port: 25
格外瞩目,发现是原来25端口其实不需要SSL加密,把加密方式改为“不加密”解决了我的问题,你可以看下日志中是否可以看到什么信息