fix(auth): SMTP 邮件 - 增加详细失败日志与敏感信息脱敏

This commit is contained in:
james committed 2026-10-09 10:34:25 +08:00
1 parent ac68378246
commit c52ced8b95
5 files changed
+204 -5

No files matched your search

-1
View File
@@ -80,7 +80,6 @@ func (s *Service) SendPasswordResetEmailCode(rawEmail string) error {
if cleanupErr := s.repo.DeleteEmailVerificationCode(record.ID); cleanupErr != nil {
log.Printf("password reset email cleanup failed: recipient=%s error=%v", maskedEmail(email), cleanupErr)
}
log.Printf("password reset email delivery failed: recipient=%s error=%v", maskedEmail(email), err)
return nil
}
if cleanupErr := s.repo.DeleteExpiredEmailVerificationCodes(now.Add(-24 * time.Hour)); cleanupErr != nil {