fix: connect EmailService to contact form handler

The contact form was logging submissions but never actually sending emails.
This commit:
- Adds EmailService field to CVHandler
- Initializes EmailService in main.go with SMTP config
- Calls SendContactForm in HandleContact handler
- Updates all test files to pass nil for emailService parameter
This commit is contained in:
juanatsap
2025-12-02 14:27:03 +00:00
parent 9842f183ea
commit f3842a3486
9 changed files with 66 additions and 30 deletions
+2 -2
View File
@@ -30,7 +30,7 @@ func TestPlainText(t *testing.T) {
t.Fatalf("Failed to create template manager: %v", err)
}
handler := NewCVHandler(tmplManager, "localhost:8080")
handler := NewCVHandler(tmplManager, "localhost:8080", nil)
tests := []struct {
name string
@@ -152,7 +152,7 @@ func TestPlainTextDownloadFilename(t *testing.T) {
t.Fatalf("Failed to create template manager: %v", err)
}
handler := NewCVHandler(tmplManager, "localhost:8080")
handler := NewCVHandler(tmplManager, "localhost:8080", nil)
tests := []struct {
name string