prompt 4
This commit is contained in:
24
codex-prompt/prompt-4.txt
Normal file
24
codex-prompt/prompt-4.txt
Normal file
@@ -0,0 +1,24 @@
|
||||
Implementa internal/mailer.
|
||||
|
||||
Requisiti:
|
||||
- directory template email: /web/emails/templates
|
||||
- verify_email.html + .txt
|
||||
- reset_password.html + .txt
|
||||
|
||||
- internal/mailer/templates.go:
|
||||
- carica e renderizza template (html+txt) con dati: AppName, BaseURL, VerifyURL/ResetURL, UserEmail.
|
||||
|
||||
- internal/mailer/mailer.go:
|
||||
- interfaccia Mailer { Send(ctx, to, subject, htmlBody, textBody) error }
|
||||
- factory NewMailer(cfg) che ritorna:
|
||||
- sink mailer se cfg.Env==develop
|
||||
- smtp mailer altrimenti
|
||||
|
||||
- internal/mailer/sink.go:
|
||||
- salva in cfg.EmailSinkDir file con timestamp__type__to.eml (o .txt/.html)
|
||||
- includi subject, to, bodies e link.
|
||||
|
||||
- internal/mailer/smtp.go:
|
||||
- invio via SMTP usando cfg.SMTPHost/Port/User/Password/From/FromName.
|
||||
|
||||
Aggiorna README con “in develop le email sono salvate in ./data/emails”.
|
||||
Reference in New Issue
Block a user