halo-dev / halo

强大易用的开源建站工具。
https://www.halo.run
GNU General Public License v3.0
33.77k stars 9.65k forks source link

邮箱无法发送 #6356

Closed hamlk closed 1 month ago

hamlk commented 2 months ago

系统信息

使用的哪种方式运行?

Fat Jar

发生了什么?

开启通知设置,配置好邮箱信息点击测试,提示:Failed to send email, please check your email configuration. 邮箱是信息填写都无错误也开启了SMTP,使用的腾讯企业邮箱,SMTP服务器地址 :smtp.exmail.qq.com 更换为163邮箱也是提升这个 Docker和Jar都是这个错误

相关日志输出

7月 22 15:54:06 linux.localdomain java[20494]: at java.base/java.lang.Thread.run(Thread.java:1570) ~[na:na]
7月 22 15:54:06 linux.localdomain java[20494]: Caused by: jakarta.mail.AuthenticationFailedException: 535 Error: authentication failed
7月 22 15:54:06 linux.localdomain java[20494]: at org.eclipse.angus.mail.smtp.SMTPTransport$Authenticator.authenticate(SMTPTransport.java:954) ~[jakarta.mail-2.0.3.jar!/:na]
7月 22 15:54:06 linux.localdomain java[20494]: at org.eclipse.angus.mail.smtp.SMTPTransport.authenticate(SMTPTransport.java:865) ~[jakarta.mail-2.0.3.jar!/:na]
7月 22 15:54:06 linux.localdomain java[20494]: at org.eclipse.angus.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:769) ~[jakarta.mail-2.0.3.jar!/:na]
7月 22 15:54:06 linux.localdomain java[20494]: at jakarta.mail.Service.connect(Service.java:345) ~[jakarta.mail-2.0.3.jar!/:na]
7月 22 15:54:06 linux.localdomain java[20494]: at org.springframework.mail.javamail.JavaMailSenderImpl.connectTransport(JavaMailSenderImpl.java:480) ~[spring-context-support-6.1.10.jar!/:6.1.10
7月 22 15:54:06 linux.localdomain java[20494]: at org.springframework.mail.javamail.JavaMailSenderImpl.doSend(JavaMailSenderImpl.java:399) ~[spring-context-support-6.1.10.jar!/:6.1.10]
7月 22 15:54:06 linux.localdomain java[20494]: ... 84 common frames omitted
lines 1-21/21 (END)

附加信息

No response

guqing commented 2 months ago

配置错误,请检查你的邮箱密码,参考文档https://docs.halo.run/user-guide/settings#%E9%80%9A%E7%9F%A5%E8%AE%BE%E7%BD%AE

guqing commented 2 months ago

/triage needs-information

hamlk commented 2 months ago

image

配置错误,请检查你的邮箱密码,参考文档https://docs.halo.run/user-guide/settings#%E9%80%9A%E7%9F%A5%E8%AE%BE%E7%BD%AE

image 你好,配置是没错的的,在cloudreve也是这个邮箱配置,是可以正常发送的

guqing commented 2 months ago
image

把这个发信地址去掉不要填,这是给第三方发件服务用的如 aws

hamlk commented 2 months ago
image

把这个发信地址去掉不要填,这是给第三方发件服务用的如 aws

image 你好,非必填的都取消了,点击测试和用户哪里放送邮箱都是不发正常发送

7月 25 17:56:23 linux.localdomain java[20494]: at java.base/java.lang.Thread.run(Thread.java:1570) ~[na:na] 7月 25 17:56:23 linux.localdomain java[20494]: Suppressed: java.lang.Exception: #block terminated with an error 7月 25 17:56:23 linux.localdomain java[20494]: at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104) ~[reactor-core-3.6.7.jar!/:3.6.7] 7月 25 17:56:23 linux.localdomain java[20494]: at reactor.core.publisher.Mono.block(Mono.java:1779) ~[reactor-core-3.6.7.jar!/:3.6.7] 7月 25 17:56:23 linux.localdomain java[20494]: at run.halo.app.notification.DefaultNotificationSender.lambda$sendNotification$0(DefaultNotificationSender.java:61) ~[!/:na] 7月 25 17:56:23 linux.localdomain java[20494]: at run.halo.app.notification.DefaultNotificationSender.reconcile(DefaultNotificationSender.java:87) ~[!/:na] 7月 25 17:56:23 linux.localdomain java[20494]: at run.halo.app.notification.DefaultNotificationSender.reconcile(DefaultNotificationSender.java:30) ~[!/:na] 7月 25 17:56:23 linux.localdomain java[20494]: at run.halo.app.extension.controller.DefaultController$Worker.run(DefaultController.java:163) ~[api-2.17.0.jar!/:na] 7月 25 17:56:23 linux.localdomain java[20494]: at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572) ~[na:na] 7月 25 17:56:23 linux.localdomain java[20494]: at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317) ~[na:na] 7月 25 17:56:23 linux.localdomain java[20494]: ... 3 common frames omitted 7月 25 17:56:23 linux.localdomain java[20494]: Caused by: jakarta.mail.AuthenticationFailedException: 535 Error: authentication failed, system busy 7月 25 17:56:23 linux.localdomain java[20494]: at org.eclipse.angus.mail.smtp.SMTPTransport$Authenticator.authenticate(SMTPTransport.java:954) ~[jakarta.mail-2.0.3.jar!/:na] 7月 25 17:56:23 linux.localdomain java[20494]: at org.eclipse.angus.mail.smtp.SMTPTransport.authenticate(SMTPTransport.java:865) ~[jakarta.mail-2.0.3.jar!/:na] 7月 25 17:56:23 linux.localdomain java[20494]: at org.eclipse.angus.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:769) ~[jakarta.mail-2.0.3.jar!/:na] 7月 25 17:56:23 linux.localdomain java[20494]: at jakarta.mail.Service.connect(Service.java:345) ~[jakarta.mail-2.0.3.jar!/:na] 7月 25 17:56:23 linux.localdomain java[20494]: at org.springframework.mail.javamail.JavaMailSenderImpl.connectTransport(JavaMailSenderImpl.java:480) ~[spring-context-support-6.1.10.jar!/:6.1.10 7月 25 17:56:23 linux.localdomain java[20494]: at org.springframework.mail.javamail.JavaMailSenderImpl.doSend(JavaMailSenderImpl.java:399) ~[spring-context-support-6.1.10.jar!/:6.1.10] 7月 25 17:56:23 linux.localdomain java[20494]: ... 12 common frames omitted 7月 25 17:56:24 linux.localdomain java[20494]: 2024-07-25T17:56:24.434+08:00 ERROR 20494 --- [ationSender-t-4] r.h.a.n.DefaultNotificationSender : Failed to send notification after retry

guqing commented 2 months ago

你好,非必填的都取消了,点击测试和用户哪里放送邮箱都是不发正常发送

参考 https://open.work.weixin.qq.com/help2/pc/19886?person_id=1&subtype=1&id=28&no=1000585

struggle-upwards commented 2 months ago

img

struggle-upwards commented 2 months ago

我也遇到这个坑,查看后台日志报了这个错

Caused by: jakarta.mail.AuthenticationFailedException: 535 Login Fail. Please enter your authorization code to login. More information in http://service.mail.qq.com/cgi-bin/help?subtype=1&&id=28&&no=1001256

就是直接点击管理服务直接生成的授权码权限不够,反而点击下面继续生成授权码就成功了 这是我的完整配置: imgimg

image-20240813194918260

guqing commented 1 month ago

/close

f2c-ci-robot[bot] commented 1 month ago

@guqing: Closing this issue.

In response to [this](https://github.com/halo-dev/halo/issues/6356#issuecomment-2300505609): >/close Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.