Configure email notifications
Metadata Capture sends automated email notifications to users during key events in the dataset record lifecycle. Configure your SMTP server and customise the database-backed email templates to enable effective communication within your organisation.
In this guide
Set up SMTP server
Customise email templates
Available template variables
Set up SMTP server
Configure your SMTP server settings to enable the application to send email notifications.
-
Configure the SMTP environment variables in your
.envfile. Here's an example configuration:SMTP_SERVER=localhostSMTP_PORT=1025SMTP_USERNAME=smtp-usernameSMTP_PASSWORD=smtp-passwordSENDER_EMAIL=sender@email.com -
Test your SMTP configuration. Run the application and trigger a test notification to verify email delivery.
SMTP requirementsYour organisation must provide its own SMTP server as described in the architecture overview. Metadata Capture does not include a built-in email service.
Customise email templates
Email templates determine the subject line and content of notifications sent during dataset record lifecycle events. They are stored in the application database; do not add an email_templates section to config.json.
To customise a template, you must have the config:manage permission:
-
Go to Admin Settings () and select Email Templates. The list of notification types appear.
-
Select the notification type you want to change. A default message is available for each notification type.
-
Edit the Subject and Body for each available language. Use template variables to include dynamic content in your messages.
-
Select Save.
Changes made on this page are stored in the database and remain in place when the application is restarted or config.json is updated.
Design templates that provide clear, actionable messages to recipients. Include relevant dataset details and direct links to help your users complete their tasks efficiently.
Available template variables
Use placeholders in the form {{variable_name}} to include dynamic content. The Email templates page shows the placeholders available for the selected notification type. Do not use $variable_name syntax.
| Notification type | Available placeholders |
|---|---|
| Dataset lifecycle notifications | {{recipient_name}}, {{dataset_title}}, {{dataset_link}} |
| Dataset deprecated with new version | Lifecycle placeholders, {{newer_dataset_title}}, {{newer_dataset_link}} |
| Role assigned | {{recipient_name}}, {{target_user_name}}, {{target_user_email}}, {{role_name}}, {{organisation_name}}, {{assigner_name}}, {{app_url}} |
| Authentic-source assignment changed | {{recipient_name}}, {{dataset_title}}, {{dataset_link}}, {{changes_summary}}, {{assigner_name}}, {{app_url}} |
| Keyword promoted to global | {{recipient_name}}, {{keyword_name}}, {{promoter_name}} |
Now that you have configured email notifications, you can review your configurations and deploy the application.