Flussonic Watcher documentation

Email customization

Setting the SMTP server Anchor Anchor x2

Configure your mailbox settings to make password recovery email reach your users. Add the mail server parameters to the configuration file.

For example, use these parameters:

Email: email.address@example.com;
Password: xyz123;
Mail server address: smtp.example.com;
Port: 465;
Connection security: SSL

Config file:

vsaas {
  database postgresql://vsaas:PASSWORD@localhost/vsaas_production;
  smtp_server smtp.example.com:465;
  smtp_login email.address:xyz123;
  email_from "Flussonic Watcher <email.address@example.com>";
  smtp_opts ssl;
}

Changing the template of forgot password emails Anchor Anchor x2

You can change the template for password recovery emails. Follow these steps:

  • Go to /opt/flussonic/apps/vsaas/watcher/templates.
  • Use the password_reset_request.email and password_changed.email text files as an examples.
  • Add the custom_ file prefix to your custom template versions: custom_password_reset_request.email and custom_password_changed.email.
  • If you want to use custom hypertext templates, add the .html extension to these files as follows: custom_password_reset_request.email.html and custom_password_changed.email.html. Save these files in the same directory.

The template consists of two parts, the header and the body. You can also add a subject to the header.

In addition, you can use variables {{data.base_url}} and {{data.token}} in the message body.

Text template example:

custom_password_reset_request.email:
---
subject: "ABC surveillance password reset"
---

Thank you for using the forgot password option. Follow this link to reset your password to the ABC surveillance system:
{{data.base_url}}/vsaas/forgot-password/{{data.token}}

HTML template example:

custom_password_reset_request.email.html:
---
subject: "ABC surveillance password reset"
---
<html>
<body>
<p>Thank you for using the forgot password option.to the ABC surveillance system:<br>
<a href="{{data.base_url}}/vsaas/forgot-password/{{data.token}}">Reset your password</a>
</p>
</body>
</html>