38 lines
1.2 KiB
Text
38 lines
1.2 KiB
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 = true,
|
||
|
|
# provider = "console",
|
||
|
|
# "console" OTPs are printed in server log and are not sent
|
||
|
|
provider = "smtp",
|
||
|
|
# smtp_host = "smtp.gmail.com",
|
||
|
|
smtp_host = "garuda.example.com",
|
||
|
|
smtp_port = 587,
|
||
|
|
# smtp_username = "${SMTP_USERNAME}",
|
||
|
|
smtp_username = "hermes@example.com",
|
||
|
|
# smtp_password = "${SMTP_PASSWORD}",
|
||
|
|
smtp_password = "psic0p0mp0!",
|
||
|
|
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 = "jpl@example.com",
|
||
|
|
# from_email = "${EMAIL_FROM}",
|
||
|
|
# from_name = "${EMAIL_FROM_NAME}",
|
||
|
|
from_name = "example",
|
||
|
|
template_dir = "site/templates/email",
|
||
|
|
email_enabled = true,
|
||
|
|
} | C.EmailConfig,
|
||
|
|
|
||
|
|
oauth = {
|
||
|
|
enabled = false,
|
||
|
|
} | C.OAuthConfig,
|
||
|
|
}
|