chore: surface SMTP error message to user on filing failure

This commit is contained in:
Claus Lohmar 2026-06-17 11:45:45 +00:00
parent 290f803996
commit 44309dc189

View file

@ -167,7 +167,7 @@ func (h *FileHandler) FileEvent(w http.ResponseWriter, r *http.Request) {
if err := h.EmailSender.SendReport(to, subject, body, attachments); err != nil {
log.Printf("ERROR [%s] handlers: FileEvent: SendReport(%s): %v",
time.Now().Format(time.RFC3339), to, err)
renderFileError(w, "Failed to send report email. Please check the recipient address and try again.")
renderFileError(w, "Failed to send report: "+err.Error())
return
}