website-htmx-rustelo-code/site/config/email.ncl
2026-07-10 03:44:13 +01:00

30 lines
972 B
Text

# Email sending and OAuth provider configuration
#
# Default provider is 'console' (logs to stdout — safe for development).
# Switch to 'smtp' or 'sendgrid' for real delivery and set the corresponding
# env vars in .env (SMTP_USERNAME, SMTP_PASSWORD, SENDGRID_API_KEY, …).
let C = import "email/contracts.ncl" in
{
email = {
enabled = false,
provider = "console",
smtp_host = "${SMTP_HOST}",
smtp_port = 587,
smtp_username = "${SMTP_USERNAME}",
smtp_password = "${SMTP_PASSWORD}",
smtp_use_tls = true,
smtp_use_starttls = true,
sendgrid_api_key = "${SENDGRID_API_KEY}",
sendgrid_endpoint = "https://api.sendgrid.com/v3/mail/send",
from_email = "${EMAIL_FROM}",
from_name = "${EMAIL_FROM_NAME}",
template_dir = "site/templates/email",
email_enabled = false,
} | C.EmailConfig,
oauth = {
enabled = false,
} | C.OAuthConfig,
}