Skip to content
DashboardWebsite

Email

The platform sends password-reset, email-verification, and invitation emails. Platform administrators configure the mail server. Each email contains a link to the dashboard:

EmailSent whenLink
Password resetSomeone requests a reset at POST /v1/auth/password/forgot, or an admin resets a password/reset-password?token=…, valid for 30 minutes
Email verificationA password account registers or requests another message at POST /v1/auth/email/verify/resend/verify-email?token=…, valid for 2 days
InvitationAn admin creates an invitation addressed to an email/invite/{token}, valid until the invitation expires

Email links use server.dashboard_base_url, falling back to server.public_base_url. The platform does not send these emails if neither setting is configured; it logs a warning. The link does not use the request’s Host header.

Set mail infrastructure in the platform config file or environment. The mail password is a secret, like storage credentials.

mail:
backend: smtp # log (default) | smtp
from_address: "OpenTremor <[email protected]>"
smtp:
host: smtp.example.com
port: 587
username: apikey
starttls: true
# password: prefer the SMTP_PASSWORD env var
KeyDefaultDescription
backendloglog writes each message to the server log. You can copy links from the log. smtp sends messages through SMTP.
from_addressno-reply@localhostThe sender’s From header.
smtp.host / smtp.portlocalhost / 587SMTP relay host and port.
smtp.username / smtp.passwordunsetThe platform logs in when smtp.username is set. SMTP_PASSWORD overrides the configured password.
smtp.starttlstrueStarts TLS after connecting. Implicit TLS on port 465 is not supported; use a STARTTLS port such as 587.

When registration.require_verified_email is enabled, the platform refuses human sessions for accounts with unconfirmed email addresses on org-scoped endpoints. This admin-editable setting defaults to false. A blocked request returns 403 and identifies POST /v1/auth/email/verify/resend as the verification endpoint. GET /v1/auth/me reports email_verified and email_verification_required.

The platform marks accounts created through SSO, social login, or SCIM as verified at creation. It also marks the bootstrap admin as verified. A password-reset link also verifies the email address.

Enable this setting only after configuring mail.backend: smtp. With the log backend, the platform does not deliver verification links.

Each email template has a subject and a plain-text body. Both use Python str.format fields. A product mounted on the platform can register a new template or replace a platform template by name:

from opentremor_platform.controllers.services.mail.templates import register_mail_template
register_mail_template(
"password_reset",
subject="Reset your {product_name} password",
body="Choose a new password: {link}\nThe link expires in {expires_in}.\n",
)

Every template receives product_name from branding.product_name. The platform provides these templates:

TemplateFields
password_resetlink, expires_in
email_verificationlink, expires_in
invitationlink, org_name, role, expires_at
backup_key_changeactor, action, recipient, label, effective_at