In order for message emails to be sent, the corresponding email server and template configuration must be present.

Example configuration: mesh-plugins/acta-nova/config.yml

mail:
  sendMails: false                   # Boolean to enable/disable sending emails (default: false)
                                     # ENV: MESH_PLUGIN_ACTA_NOVA_MAIL_SEND_MAILS
  sender: "noreply@gentics.com"      # Email address used as sender for notification emails
                                     # ENV: MESH_PLUGIN_ACTA_NOVA_MAIL_SENDER

  smtp:
    hostname: "smtp.example.com"     # Hostname of the SMTP server
                                     # ENV: MESH_PLUGIN_ACTA_NOVA_MAIL_SMTP_HOSTNAME
    port: 587                        # Port of the SMTP server (e.g., 587 for TLS, 465 for SSL)
                                     # ENV: MESH_PLUGIN_ACTA_NOVA_MAIL_SMTP_PORT
    username: "user@example.com"     # Username for SMTP server authentication
                                     # ENV: MESH_PLUGIN_ACTA_NOVA_MAIL_SMTP_USERNAME
    password: "securepassword"       # Password for SMTP server authentication
                                     # ENV: MESH_PLUGIN_ACTA_NOVA_MAIL_SMTP_PASSWORD
    ssl: false                       # Whether to use SSL for connecting to the SMTP server
                                     # ENV: MESH_PLUGIN_ACTA_NOVA_MAIL_SMTP_SSL
    sslTrustAll: false               # Whether to trust all SSL certificates
                                     # ENV: MESH_PLUGIN_ACTA_NOVA_MAIL_SMTP_SSL_TRUST_ALL

  mailProjectMapping:                # Project-specific email configurations
                                     # No direct ENV variable for this field
    default:
      templatePath: "/templates/notificationCreated_andp_%s.hbs"  # Path to the email template
      portalBaseUrl: "${ANDP_MAIL_PORTALURL_DEFAULT}"             # Base URL for the portal

mailProjectMapping

There are use cases in which different email templates should be used for each portal. When a user logs in for the first time, the currently used portal (the Mesh project name) is saved in their settings, e.g., "DialogPortal".

If this user now receives a message, a mailProjectMapping for "DialogPortal" is searched and used for sending the email (template + base URL). However, a default mapping should always be present as a fallback.

mailProjectMapping:
    default:
      templatePath: "/templates/notificationCreated_andp_%s.hbs"  # Path to the email template
      portalBaseUrl: "${ANDP_MAIL_PORTALURL_DEFAULT}"
    DialogPortal:
      templatePath: "/templates/notificationCreated_dialogportal_%s.hbs"  # Path to the email template for Dialogportal
      portalBaseUrl: "${ANDP_MAIL_PORTALURL_DIALOGPORTAL}"

The templatePath is the path to the email template in the Mesh Acta-Nova plugin storage directory (e.g., /mesh-plugins/acta-nova/storage/templates/…​.).

The %s is replaced by the language of the message (defined in Acta-Nova), for example, by de-AT. As a fallback, the system always looks for a Handlebars template without %s.

The Base URL should contain the URL to the portal (to ensure that the linking in the email is correct). Here, you can either define a hardcoded URL (e.g., https://actanova-dialogportal.at) or use an environment variable (see example).

Important: For security reasons, the environment variable must have a specific name: ANDP_MAIL_PORTALURL_XXX, where only the XXX part can be chosen freely.