Overhaul email sending system

Add logging and saving templates to the database for historical
accuracy.
This commit is contained in:
Eli Ribble 2026-01-23 20:36:16 +00:00
parent 3fed489258
commit 196792810b
No known key found for this signature in database
44 changed files with 4846 additions and 2361 deletions

View file

@ -12,6 +12,7 @@ import (
"github.com/Gleipnir-Technology/nidus-sync/auth"
"github.com/Gleipnir-Technology/nidus-sync/background"
"github.com/Gleipnir-Technology/nidus-sync/comms/email"
"github.com/Gleipnir-Technology/nidus-sync/config"
"github.com/Gleipnir-Technology/nidus-sync/db"
"github.com/Gleipnir-Technology/nidus-sync/public-report"
@ -39,6 +40,12 @@ func main() {
os.Exit(2)
}
err = email.LoadTemplates()
if err != nil {
log.Error().Err(err).Msg("Failed to load email templates")
os.Exit(3)
}
router_logger := log.With().Logger()
r := chi.NewRouter()