修复异步邮件投递状态与587端口加密协议

This commit is contained in:
xuans committed 2026-09-16 21:02:10 +08:00
1 parent 4af529bb7a
commit 6496033379
6 files changed
+116 -61

No files matched your search

+2 -2
View File
@@ -283,8 +283,8 @@ func doSend(ctx *context.Context, fromDomain string, data []byte, to []*parsemai
"object": domain.mxHost + ":25",
}).Infof("SMTP 25 端口 STARTTLS 投递失败: %s", err.Error())
// 再试用587投递
err = smtp.SendMailWithTls(strings.TrimSuffix(domain.mxHost, "."), domain.mxHost+":587", nil, from, fromDomain, buildAddress(tos), data)
// 587 使用 STARTTLS,只有 465 使用隐式 TLS。
err = smtp.SendMail(strings.TrimSuffix(domain.mxHost, "."), domain.mxHost+":587", nil, from, fromDomain, buildAddress(tos), data)
if err == nil {
accepted.Add(int64(len(tos)))
return