Skip to content

Email Templates

The Email Templates section lets you manage the HTML email templates used for system notifications: welcome emails for new users and admins, password reset messages, and one-time invite links.

Templates are stored in the database and can be overridden per-tenant. The system looks up the most specific matching template (tenant-specific first, then global) before falling back to a built-in default.

This is the only place email content is edited. Earlier releases also had separate Welcome Email screens at the system and organization level that kept their own copies of the welcome text in files; those screens have been removed and their templates imported here on upgrade. Whether a welcome email is sent is a separate setting - see Sending the welcome email below.

Template Types

TypeWhen Used
welcome_userSent when a new extension user is created with the Require Password Change onboarding mode
welcome_adminSent when a new administrator or reseller is created with the Require Password Change mode
account_welcomeSent when a new tenant account is created
password_resetSent when an admin resets a user or admin password from the manager
invite_userSent when a new extension user is created with the Send Invite Link onboarding mode
invite_adminSent when a new administrator is created with the Send Invite Link onboarding mode

Template Variables

Use ${VARIABLE} placeholders in both the subject and body. Available variables:

VariableDescription
${FIRST_NAME}Recipient first name
${LAST_NAME}Recipient last name
${WEB_USER_NAME}Login username
${WEB_PASSWORD}Temporary password (temppass mode only; empty in invite mode)
${WEB_INVITE_URL}One-time set-password URL (invite mode only)
${EXT}Extension number (user accounts)
${DID}Direct inward dial number
${PHONE_USER_NAME}SIP phone username
${PHONE_PASSWORD}SIP phone password
${VM_PIN}Voicemail PIN
${VM_TO_EMAIL}Voicemail delivery email address
${VM_DELETE}Whether voicemail is deleted after email delivery
${EMAIL}Recipient email address
${DEPARTMENT}User department
${SERVICE_FQDN}PBX hostname
${COMPANY_NAME}Organization name
${TENANT_NAME}Organization name (multi-tenant)
${CONNECT_ENABLED}Whether Thirdlane Connect is enabled
${BRAND_COMPANY}Branding company name
${BRAND_SUPPORT_EMAIL}Branding support email
${BRAND_SUPPORT_URL}Branding support URL

Conditional Blocks

Use ${IF-VARIABLE}...${ELSE-VARIABLE}...${ENDIF-VARIABLE} syntax to show or hide sections based on whether a variable has a value:

${IF-WEB_INVITE_URL}
<p>Click here to set your password: <a href="${WEB_INVITE_URL}">${WEB_INVITE_URL}</a></p>
${ELSE-WEB_INVITE_URL}
<p>Your temporary password: ${WEB_PASSWORD}</p>
${ENDIF-WEB_INVITE_URL}

Onboarding Mode and Templates

The onboarding mode, configured separately for administrators and end users in System Preferences, determines which template type is used:

  • Invite Link mode: uses invite_user / invite_admin templates, sets ${WEB_INVITE_URL}, clears ${WEB_PASSWORD}. A one-time link lets the recipient set their own password; it expires after 72 hours, and an email address is required when creating the account.
  • Require Password Change mode: uses welcome_user / welcome_admin templates, sets ${WEB_PASSWORD}, no invite URL. The recipient is prompted to change the temporary password at first login. Without an email address the message is simply skipped.

Make sure your templates match the onboarding mode. The default templates include conditional blocks that handle both cases gracefully.

Sending the welcome email

Editing a template does not by itself cause anything to be sent. Sending is controlled separately:

  • Multi-tenant systems: each organization has an Enable Welcome Email setting on the Welcome Email tab of its organization settings. It is a simple yes/no - the template used is that organization’s own welcome_user template if it has one, otherwise the system-wide one.
  • Single-tenant systems: the equivalent Send Welcome Email setting is in System Preferences.

Regardless of this setting, you can send a welcome email at any time from the User Extensions screen.

Links in these messages use the Service Address from System Preferences. Set it whenever the system sits behind a proxy or load balancer, where the server’s own host name is not the address users can reach.

Tenant Overrides

When a tenant is selected in the Tenant Override field, that template applies only for that tenant. Leave the field blank to create or edit the global default.

Organization administrators see this screen too, restricted to their own organization: they see their overrides alongside the system-wide templates they inherit, and saving an inherited template creates an override for their organization rather than changing what everyone else receives. Deleting an override reverts them to the system-wide template.

Preview

Click the Preview button on any template row to see a rendered preview using sample data. The preview opens in a popup window showing exactly how the email will appear to recipients.

To check real delivery rather than layout, use the Test Email Address field on the Welcome Email tab of an organization (or in the tenant wizard) and click Send Test Email. The test uses whatever template that organization currently resolves to, populated with sample data.

Default Templates

On fresh installation or upgrade, the system seeds default templates for all six types. Invite templates include a styled “Set Your Password” button linking to ${WEB_INVITE_URL} and account details. Existing custom templates are never overwritten.

Best practices

  • Match the template to the onboarding mode. Invite mode populates ${WEB_INVITE_URL} (and clears ${WEB_PASSWORD}); temporary-password mode does the reverse. Use conditional blocks so one template handles both cleanly.
  • Preview before relying on a template so you catch layout or variable issues before real users receive the email.
  • Never email a plaintext password unnecessarily. Prefer invite-link onboarding, which lets users set their own password instead of sending one.
  • Override per tenant only when needed - keep a solid global default and customize individual tenants sparingly.