en En
es Es

Message templates

BILLmanager has a built-in notification system to notify users about important events: automatic service renewal, registration confirmation, etc. The notifications (messages) are created and sent automatically. The message text is based on EJS-templates.

All messages are divided into three types depending on your sending method:

  • Email notifications 
  • SMS 
  • Notifications in the Notifications module

Template configuration

Every template can be assigned only to one provider. If a provider wasn't selected, then the message template will be used for all providers who don't have a personal template.

Message templates also support localization. You can configure message templates only for active and built-in localizations. Each template can use a different markup.

Edit the message template:

Unsubscribe

To add an unsubscribe option to a message template:

Go to Settings → Message Templates → Email Messages → Templates button.

Modify an existing message template or Create a new one.

Add the code to the template.

<a href="<%- billurl %>?func=unsubscribe&cmdhash=<%= cmdhash %> target="_blank">link_text</a>

Пример
			<div id="unsubscribe">
				<hr size="1" color="#D5D5D5"/>
    			You received this email because you are registered on the <%= project.name %> site.
				You can unsubscribe from all <%= project.name %> news, and by doing so you confirm that you refuse to be notified of all significant events and changes to the service, including financial and legal issues.
<br/><br/>
        I am aware of the possible consequences and want to <a href="<%- billurl %>?func=unsubscribe&cmdhash=<%= cmdhash %>" style="color:#666" target="_blank">subscribe from news</a>.
			</div>

Types of notifications that you cannot unsubscribe from:

  • Password reset;
  • Email password recovery;
  • Password has been successfully recovered;
  • Abuse. Reaching the deadline to rectify discovered violations;
  • Abuse. You have reached the deadline to rectify discovered violations;
  • Abuse. You have exceeded the maximum number of abuse scores;
  • Service profile registration errors;
  • Email activation;
  • Notification about payer creation;
  • Export personal data;
  • Gateway. Email confirmation required;
  • Gateway. Cannot identify the client by his email address;
  • Gateway. Your email has been successfully confirmed;
  • Gateways. You cannot create a support ticket as you don't have free support incidents;
  • Gateways. Failed to verify sender's email;
  • Check payer by email;
  • Account verification by email;
  • Send invoice;
  • New client has been registered;
  • Notification about payer creation.

Copying messages to other notification channels

You can duplicate messages through all configured notification gateways. For example, SMS or Telegram. To do this, enable the option Copy to notifications in the template.
To enable the option:

  1. In the main menu, go to the section SettingsMessage templatesEmail notificationsTemplates button.
  2. Select the template Message from provider (send to client)Edit.
  3. Enable Copy to notifications option.
  4. Click Ok.

If you need to send messages only via email or configure separate mailings, disable the option.

For example, you need to organize separate mailings for different communication channels:

  • for email — with HTML markup and full formatting;
  • for Telegram — with text markup adapted to the specific channel.

To do this:

  1. Disable Copy to notifications option.
  2. Create separate mailings or configure separate message templates specifically for messengers.

Security

Isolating the environment

Starting with version 6.124, templates are generated in an isolated environment to protect against vulnerabilities. When installing or upgrading BILLmanager, the billmanager-plugin-template-processor software package is installed. This package:

  1. Sets up the containerization environment:
    • in Ubuntu — Docker;
    • in AlmaLinux — Podman.
  2. Downloads an image with scripts to safely generate templates.

You can disable the use of the isolated environment. For example, if templates are not formed correctly. To do this:

  1. Add the Option DisableTemplateProcessor to the /usr/local/mgr5/etc/billmgr.conf configuration file. For more information, see the Configuration file article.
  2. Restart the platform: 
    /usr/local/mgr5/sbin/mgrctl -m billmgr -R