Entry Points, Flags & Environment
Reference: Entry Points, Flags & Environment
This page documents the environment variables used by the mailer package to configure transactional email delivery. These variables are read by the application to determine whether to send emails via an SMTP relay or fall back to logging them to the server console.
Environment Variables
TELA_SMTP_FROM
- Location:
backend/internal/mailer/smtp.go:41—os.Getenv - Description: Specifies the "From" header and envelope sender address for emails. If not set, it defaults to the value of
TELA_SMTP_USERNAME.
TELA_SMTP_HOST
- Location:
backend/internal/mailer/smtp.go:27—os.Getenv - Description: The hostname of the SMTP relay server. If this variable is unset, the mailer falls back to the
LogMailer, which logs emails instead of sending them.
TELA_SMTP_PASSWORD
- Location:
backend/internal/mailer/smtp.go:49—os.Getenv - Description: The password used for SMTP authentication. This is required when SMTP authentication is enabled.
TELA_SMTP_PORT
- Location:
backend/internal/mailer/smtp.go:32—os.Getenv - Description: The port number to connect to the SMTP server. Defaults to
587if not specified.
TELA_SMTP_TLS
- Location:
backend/internal/mailer/smtp.go:37—os.Getenv - Description: Controls the TLS policy for the SMTP connection. Valid values are
"starttls"(default),"ssl", or"none".
TELA_SMTP_USERNAME
- Location:
backend/internal/mailer/smtp.go:43—os.Getenv - Description: The username used for SMTP authentication. This is required when SMTP authentication is enabled.