Skip to main content

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.

  1. Configure the SMTP environment variables in your .env file. Here's an example configuration:

    SMTP_SERVER=localhost
    SMTP_PORT=1025
    SMTP_USERNAME=smtp-username
    SMTP_PASSWORD=smtp-password
    SENDER_EMAIL=sender@email.com
  2. Test your SMTP configuration. Run the application and trigger a test notification to verify email delivery.

    SMTP requirements

    Your 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:

  1. Go to Admin Settings () and select Email Templates. The list of notification types appear.

  2. Select the notification type you want to change. A default message is available for each notification type.

  3. Edit the Subject and Body for each available language. Use template variables to include dynamic content in your messages.

  4. 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.


Email template design

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 typeAvailable placeholders
Dataset lifecycle notifications{{recipient_name}}, {{dataset_title}}, {{dataset_link}}
Dataset deprecated with new versionLifecycle 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}}

Well done!

Now that you have configured email notifications, you can review your configurations and deploy the application.