This is the main dovel repository, it has the Go code to run dovel SMTP server.
Author: blmayer (bleemayer@gmail.com)
Date: Fri Jan 27 13:51:12 2023 -0300
Parent: 3a06a9c
Updated template type
commit aa3a4bdcd6f9135eea448388c33d7442f7b547ef Author: blmayer <bleemayer@gmail.com> Date: Fri Jan 27 13:51:12 2023 -0300 Updated template type diff --git a/cmd/dovel/main.go b/cmd/dovel/main.go index 187f645..6e2f485 100644 --- a/cmd/dovel/main.go +++ b/cmd/dovel/main.go @@ -136,7 +136,7 @@ func main() { case "file": mailCfg := file.FileConfig{ Root: hand.Root, - Templates: hand.Templates, + Templates: &hand.Templates, Password: os.Getenv("DOVEL_PASS"), } funcs := map[string]any{"heading": heading}
commit aa3a4bdcd6f9135eea448388c33d7442f7b547ef Author: blmayer <bleemayer@gmail.com> Date: Fri Jan 27 13:51:12 2023 -0300 Updated template type diff --git a/interfaces/file/file.go b/interfaces/file/file.go index 9e60438..bc75811 100644 --- a/interfaces/file/file.go +++ b/interfaces/file/file.go @@ -48,9 +48,9 @@ func NewFileHandler(c FileConfig, fs map[string]any) (FileHandler, error) { fs["mail"] = f.Mail var err error - if c.Templates != "" { + if c.Templates != nil { f.templates, err = template.New(c.Root).Funcs(fs). - ParseGlob(c.Templates + "/*.html") + ParseGlob(*c.Templates + "/*.html") } return f, err }
commit aa3a4bdcd6f9135eea448388c33d7442f7b547ef Author: blmayer <bleemayer@gmail.com> Date: Fri Jan 27 13:51:12 2023 -0300 Updated template type diff --git a/interfaces/main.go b/interfaces/main.go index 8c7c4e1..96352fd 100644 --- a/interfaces/main.go +++ b/interfaces/main.go @@ -55,7 +55,7 @@ type Email struct { func ToEmail(mail parsemail.Email) Email { m := Email{ - From: mail.Sender.Address, + From: mail.From[0].Address, To: []string{}, Cc: []string{}, Subject: mail.Subject,