forked from wrenn/wrenn
Add transactional email system via SMTP
Introduce internal/email package with SMTP sending, embedded HTML/text templates, and multipart MIME assembly. Emails use a generic EmailData struct (recipient name, message, optional button, optional closing) so new email types can be added without code changes. Wired into signup (welcome email), team creation, and team member addition. No-op mailer when SMTP_HOST is not configured.
This commit is contained in:
13
internal/email/templates/base.txt
Normal file
13
internal/email/templates/base.txt
Normal file
@ -0,0 +1,13 @@
|
||||
{{if .RecipientName}}Hello {{.RecipientName}},
|
||||
|
||||
{{end}}{{.Message}}
|
||||
{{if .Button}}
|
||||
|
||||
{{.Button.Text}}: {{.Button.URL}}
|
||||
{{end}}{{if .Closing}}
|
||||
|
||||
{{.Closing}}
|
||||
{{end}}
|
||||
|
||||
---
|
||||
This is a transactional email from Wrenn (https://wrenn.dev).
|
||||
Reference in New Issue
Block a user