mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-09-22 03:04:03 +00:00
fix: email test now uses saved password when not provided
- Test email button now works without re-entering password - Backend uses saved password if test request has empty password - Fixes authentication error when testing email notifications
This commit is contained in:
@@ -268,6 +268,12 @@ func (h *NotificationHandlers) TestNotification(w http.ResponseWriter, r *http.R
|
||||
}
|
||||
} else if req.Method == "email" && req.Config != nil {
|
||||
// If config is provided, use it for testing (without saving)
|
||||
// If password is empty, use the saved password
|
||||
if req.Config.Password == "" {
|
||||
savedConfig := h.monitor.GetNotificationManager().GetEmailConfig()
|
||||
req.Config.Password = savedConfig.Password
|
||||
}
|
||||
|
||||
log.Info().
|
||||
Bool("enabled", req.Config.Enabled).
|
||||
Str("smtp", req.Config.SMTPHost).
|
||||
|
||||
Reference in New Issue
Block a user