Add email logging and SMTP health check

- Add structured logging for email sending (success/failure)
- Add HealthCheck method to EmailService interface
- Extend /health endpoint to include SMTP status
- Update all email service mocks to implement HealthCheck
- SMTP status shows: ok, error, or disabled
This commit is contained in:
2025-12-03 20:41:40 +01:00
parent 935f742ac9
commit 568ba3b016
7 changed files with 60 additions and 5 deletions
@@ -65,6 +65,10 @@ func (m *mockEmailService) Send(message services.EmailMessage) error {
return nil
}
func (m *mockEmailService) HealthCheck() error {
return nil
}
func TestVerifyEmailHandler_Success(t *testing.T) {
token := "valid-token"
expiry := time.Now().Add(24 * time.Hour)