Configure Mail Templates
Mail Templates define the subject and body of email notifications sent by the system for specific events such as user registration, password resets, build status changes, and system-level actions. These templates are used by the Notifier service to generate the final email content delivered to users.
BuildNinja allows you to configure these mail templates. You can:
- Customize email messaging to match organizational communication standards.
- Add or modify dynamic content using supported template variablesMail Templates support dynamic variables that are replaced with runtime values when the email is generated. Variables are template-scope specific and can be used only with the events they support..
- Create different templates for build-related notifications when required.
Mail Templates are event-driven and are selected automatically based on the event that occurs. For build-related events, the selected template is determined by the Notification SettingsBuildNinja enables you to configure Notification Settings at the build configuration level. These settings define how and when you receive alerts for your builds. of the corresponding build configuration.
Mail Template Types
Mail Templates are grouped by the type of system event that triggers them. Each group is identified by a fixed template scope.
User and Account Templates
User and account templates are triggered by user lifecycle and account-related events. They are system-level templates and cannot be created or deleted.
| Template Scope | Description |
|---|---|
| Signup | Sent when a new user registers in the system. |
| Signup SSO | Sent when a new user signs up or logs in for the first time using Single Sign-On (SSO). |
| User Added | Sent when an administrator adds a new user. |
| User Blocked | Sent when a user account is blocked. |
| User Approved | Sent when a user registration request is approved. |
| User Rejected | Sent when a user registration request is rejected. |
| Forgot Password | Sent when a user requests a password reset. |
| Password Reset | Sent after a user password is successfully reset. |
Build and CI Templates
Build and CI templates are triggered by build execution events. Multiple custom templates can be created for these event types.
| Template Scope | Description |
|---|---|
| Build Failure | Sent when a build fails. |
| Build Success | Sent when a build passes successfully. |
| Build Completed | Sent when a build completes, regardless of status. |
System and Agent Templates
System and agent templates are related to system health and configuration testing.
| Template Scope | Description |
|---|---|
| Agent Disconnected | Sent when a build agent disconnects. |
| Test SMTP | Used only to test SMTP configuration and email delivery. This template is triggered only from the notifier test action and is not associated with any system or build event. |
Template Fields
Each mail template contains the following fields:
| Field | Description |
|---|---|
| Scope | Event type that triggers the template. |
| Name | Display name of the template shown in the UI. |
| Subject | Email subject line. Plain text and variables are allowed. |
| Body | Email body in HTML format. Variables are allowed. |

The Content field must contain valid HTML. Plain-text email bodies are not supported.
Create New Build Mail Template
-
Navigate to Settings
and open Mail Templates.

-
Click Add New Template.

-
In the Add New Template pop-up, provide the following details:
- Scope: Select one of the supported build-related scopes.
- Name: Display name for the template.
- Subject: Subject line of the email. Variables are allowed.
- Body: HTML body of the email. Variables are allowed.

-
Click Save to create the template.

Edit Mail Template
-
Select the required template from the list and click the Ellipsis ⋮ to open the options menu.

-
Click Edit.

-
Make the required changes, and then click Save to apply them.

Reset Mail Template to Default
Reset restores the template to the default version for the currently installed application release. After a reset, future application upgrades may automatically update the template.
-
Select the required template from the list and click the Ellipsis ⋮ to open the options menu.

-
Click Reset. The template will reset to the default version for the currently installed application release.

Custom build templates cannot be reset.
Delete Build Mail Template
Delete removes the selected custom build mail template that is no longer required. System default templates cannot be deleted.
-
Select the required template from the list and click the Ellipsis ⋮ to open the options menu.

-
Click Delete.

If a deleted template is still assigned to a build configuration, email delivery will fail for that event. Ensure the template is removed from all build notification settings before deleting it.